Metadata-Version: 2.4
Name: fbdfile
Version: 2025.9.16
Summary: Read FLIMbox data and related files (FBD, FBF, FBS.XML)
Home-page: https://www.cgohlke.com
Author: Christoph Gohlke
Author-email: cgohlke@cgohlke.com
License: BSD-3-Clause
Project-URL: Bug Tracker, https://github.com/cgohlke/fbdfile/issues
Project-URL: Source Code, https://github.com/cgohlke/fbdfile
Platform: any
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: numpy
Provides-Extra: all
Requires-Dist: tifffile; extra == "all"
Requires-Dist: matplotlib; extra == "all"
Requires-Dist: click; extra == "all"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: platform
Dynamic: project-url
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

Read FLIMbox data and related files (FBD, FBF, FBS.XML)
=======================================================

Fbdfile is a Python library to read FLIMbox data (FBD), firmware (FBF), and
setting (FBS.XML) files. The FLIMbox is an FPGA-based device for high
bandwidth, multi-channel data collection for fluorescence lifetime-resolved
imaging (FLIM) from a pulsed laser scanning confocal microscope.
The files are written by SimFCS and ISS VistaVision software.

:Author: `Christoph Gohlke <https://www.cgohlke.com>`_
:License: BSD-3-Clause
:Version: 2025.9.16

Quickstart
----------

Install the fbdfile package and all dependencies from the
`Python Package Index <https://pypi.org/project/fbdfile/>`_::

    python -m pip install -U fbdfile[all]

See `Examples`_ for using the programming interface.

Source code and support are available on
`GitHub <https://github.com/cgohlke/fbdfile>`_.

Requirements
------------

This revision was tested with the following requirements and dependencies
(other versions may work):

- `CPython <https://www.python.org>`_ 3.11.9, 3.12.10, 3.13.7, 3.14.0rc 64-bit
- `NumPy <https://pypi.org/project/numpy>`_ 2.3.3
- `Matplotlib <https://pypi.org/project/matplotlib/>`_ 3.10.6 (optional)
- `Tifffile <https://pypi.org/project/tifffile/>`_ 2025.9.9 (optional)
- `Click <https://pypi.python.org/pypi/click>`_ 8.2.1
  (optional, for command line apps)
- `Cython <https://pypi.org/project/cython/>`_ 3.1.4 (build)

Revisions
---------

2025.9.16

- Initial alpha release based on lfdfiles 2025.7.31.

Notes
-----

The API is not stable yet and might change between revisions.

Python <= 3.10 is no longer supported. 32-bit versions are deprecated.

The latest Microsoft Visual C++ Redistributable for Visual Studio 2015-2022
is required on Windows.

The FLIMbox formats are not documented and might change arbitrarily.
This implementation is based on reverse engineering existing files.
No guarantee can be made as to the correctness of code and documentation.

`SimFCS <https://www.lfd.uci.edu/globals/>`_, a.k.a. Globals for Images,
is software for fluorescence image acquisition, analysis, and simulation,
developed by Enrico Gratton at UCI.

`VistaVision <http://www.iss.com/microscopy/software/vistavision.html>`_
is commercial software for instrument control, data acquisition, and data
processing by ISS Inc (Champaign, IL).

Examples
--------

Read a FLIM lifetime image and metadata from an FBD file:

>>> with FbdFile('tests/data/flimbox$CBCO.fbd') as fbd:
...     bins, times, markers = fbd.decode()
...
>>> print(bins[0, :2], times[:2], markers[:2])
[50 58] [ 0 32] [1944097 2024815]
>>> import numpy
>>> hist = [numpy.bincount(b[b >= 0]) for b in bins]
>>> int(numpy.argmax(hist[0]))
53
>>> image = fbd.asimage((bins, times, markers))
>>> image.shape
(1, 2, 256, 256, 64)

View the histogram and metadata in a FLIMbox data file from the console::

    $ python -m fbdfile tests/data/flimbox$CBCO.fbd
