pyfli-lib 0.1.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. pyfli_lib-0.1.3/LICENSE +21 -0
  2. pyfli_lib-0.1.3/PKG-INFO +70 -0
  3. pyfli_lib-0.1.3/README.md +41 -0
  4. pyfli_lib-0.1.3/pyproject.toml +47 -0
  5. pyfli_lib-0.1.3/setup.cfg +4 -0
  6. pyfli_lib-0.1.3/src/pyfli/__init__.py +22 -0
  7. pyfli_lib-0.1.3/src/pyfli/scripts/__init__.py +19 -0
  8. pyfli_lib-0.1.3/src/pyfli/scripts/analytical_methods/__init__.py +4 -0
  9. pyfli_lib-0.1.3/src/pyfli/scripts/analytical_methods/am_utils.py +15 -0
  10. pyfli_lib-0.1.3/src/pyfli/scripts/analytical_methods/laguerre_deconvolution.py +2 -0
  11. pyfli_lib-0.1.3/src/pyfli/scripts/analytical_methods/nlsf.py +1476 -0
  12. pyfli_lib-0.1.3/src/pyfli/scripts/analytical_methods/phasor.py +1051 -0
  13. pyfli_lib-0.1.3/src/pyfli/scripts/dataCC/IRF_process.py +98 -0
  14. pyfli_lib-0.1.3/src/pyfli/scripts/dataCC/__init__.py +4 -0
  15. pyfli_lib-0.1.3/src/pyfli/scripts/dataCC/dataCC_utils.py +55 -0
  16. pyfli_lib-0.1.3/src/pyfli/scripts/dataIO/__init__.py +4 -0
  17. pyfli_lib-0.1.3/src/pyfli/scripts/dataIO/dataIO_utils.py +19 -0
  18. pyfli_lib-0.1.3/src/pyfli/scripts/dataIO/data_operations.py +810 -0
  19. pyfli_lib-0.1.3/src/pyfli/scripts/dataIO/dataoperations.py +244 -0
  20. pyfli_lib-0.1.3/src/pyfli/scripts/dataIO/dataops_static.py +75 -0
  21. pyfli_lib-0.1.3/src/pyfli/scripts/dataIO/processed_DataOperation.py +235 -0
  22. pyfli_lib-0.1.3/src/pyfli/scripts/dataVnP/__init__.py +4 -0
  23. pyfli_lib-0.1.3/src/pyfli/scripts/dataVnP/colorProcess.py +13 -0
  24. pyfli_lib-0.1.3/src/pyfli/scripts/dataVnP/dv_multiPlotter.py +355 -0
  25. pyfli_lib-0.1.3/src/pyfli/scripts/dataVnP/mdataViz.py +79 -0
  26. pyfli_lib-0.1.3/src/pyfli/scripts/roiMaker/__init__.py +4 -0
  27. pyfli_lib-0.1.3/src/pyfli/scripts/roiMaker/roi_maker.py +210 -0
  28. pyfli_lib-0.1.3/src/pyfli/scripts/simulator/fliPhysicsModel.py +335 -0
  29. pyfli_lib-0.1.3/src/pyfli/scripts/simulator/gatedSim.py +581 -0
  30. pyfli_lib-0.1.3/src/pyfli/scripts/simulator/simImageGen.py +574 -0
  31. pyfli_lib-0.1.3/src/pyfli/scripts/simulator/tcspcSim.py +491 -0
  32. pyfli_lib-0.1.3/src/pyfli/scripts/simulatorPhysics.py +581 -0
  33. pyfli_lib-0.1.3/src/pyfli/scripts/solver/__init__.py +8 -0
  34. pyfli_lib-0.1.3/src/pyfli/scripts/solver/base_fitter.py +278 -0
  35. pyfli_lib-0.1.3/src/pyfli/scripts/solver/comparison.py +156 -0
  36. pyfli_lib-0.1.3/src/pyfli/scripts/solver/flicpuFitter.py +153 -0
  37. pyfli_lib-0.1.3/src/pyfli/scripts/solver/fligpuFitter.py +482 -0
  38. pyfli_lib-0.1.3/src/pyfli/scripts/solver/globalFitter.py +212 -0
  39. pyfli_lib-0.1.3/src/pyfli/scripts/solver/mleFitter.py +192 -0
  40. pyfli_lib-0.1.3/src/pyfli/scripts/solver/solver_utils.py +34 -0
  41. pyfli_lib-0.1.3/src/pyfli/scripts/ssRLD.py +90 -0
  42. pyfli_lib-0.1.3/src/pyfli/scripts/stat_tests.py +273 -0
  43. pyfli_lib-0.1.3/src/pyfli/scripts/utils_common.py +392 -0
  44. pyfli_lib-0.1.3/src/pyfli_lib.egg-info/PKG-INFO +70 -0
  45. pyfli_lib-0.1.3/src/pyfli_lib.egg-info/SOURCES.txt +46 -0
  46. pyfli_lib-0.1.3/src/pyfli_lib.egg-info/dependency_links.txt +1 -0
  47. pyfli_lib-0.1.3/src/pyfli_lib.egg-info/requires.txt +18 -0
  48. pyfli_lib-0.1.3/src/pyfli_lib.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vikas Pandey
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyfli-lib
3
+ Version: 0.1.3
4
+ Summary: Unified Fluorescence Lifetime Imaging (FLI) data processing platform using analytical and deep learning methods.
5
+ Author: Vikas Pandey
6
+ Project-URL: Homepage, https://github.com/vkp217/pyfli-pkg
7
+ Project-URL: Repository, https://github.com/vkp217/pyfli-pkg.git
8
+ Project-URL: Issues, https://github.com/vkp217/pyfli-pkg/issues
9
+ Requires-Python: >=3.11
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: h5py>=3.10.0
13
+ Requires-Dist: sdtfile>=2025.0.0
14
+ Requires-Dist: tifffile>=2025.0.0
15
+ Requires-Dist: joblib>=1.3.0
16
+ Requires-Dist: scikit-image>=0.22.0
17
+ Requires-Dist: imagecodecs
18
+ Requires-Dist: opencv-python>=4.8.0
19
+ Requires-Dist: numpy>=1.24.0
20
+ Requires-Dist: matplotlib>=3.7.0
21
+ Provides-Extra: ai
22
+ Requires-Dist: tensorflow>=2.15.0; extra == "ai"
23
+ Requires-Dist: torch>=2.0.0; extra == "ai"
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest; extra == "dev"
26
+ Requires-Dist: black; extra == "dev"
27
+ Requires-Dist: ipykernel>=6.0.0; extra == "dev"
28
+ Dynamic: license-file
29
+
30
+ # pyfli: A Unified Platform for FLI Data Processing
31
+
32
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
33
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
34
+ [![PyPI version](https://img.shields.io/pypi/v/pyfli-lib.svg)](https://pypi.org/project/pyfli-lib/)
35
+
36
+ `pyfli` is a comprehensive library designed for **Fluorescence Lifetime Imaging (FLI)** data processing. It streamlines the workflow for handling diverse file formats from various hardware manufacturers and provides a standardized pipeline for both traditional analytical and deep-learning-based inference.
37
+
38
+ ---
39
+
40
+ ## Key Features
41
+
42
+ * **Universal Processing Pipeline:** Simplifies the handling of multiple FLI file types (ICCD, SPAD, TCSPC).
43
+ * **Enhanced FLI Simulator:** A robust simulation engine adaptable to specific camera hardware parameters and noise models.
44
+ * **Standardized Inference:** Unified interface for time-resolved microscopy and macroscopic FLI data (MFLI).
45
+
46
+ ## Supported Data Acquisition Methods
47
+
48
+ The platform provides native support for several high-end imaging systems:
49
+
50
+ 1. **ICCD:** Intensified Charge-Coupled Device cameras for fast-gated, wide-field imaging.
51
+ 2. **SwissSPAD2 & SwissSPAD3:** High-speed SPAD (Single-Photon Avalanche Diode) architectures for high-resolution photon counting.
52
+ 3. **SPCImage/TCSPC:** Standardized processing for Time-Correlated Single Photon Counting microscopy data.
53
+
54
+ ## Data Processing & Analysis
55
+
56
+ `pyfli` implements industry-standard analytical methods to extract lifetime information:
57
+
58
+ * **Non-linear Least Squares (NLLS) Fitting:** Robust mathematical approach for exponential decay modeling.
59
+ * **Phasor Plot Analysis:** Graphical, model-free transformation of fluorescence decay into a 2D polar plot for easy species separation.
60
+ * **Maximum Likelihood Estimation (MLE):** Statistical estimator optimized for low-photon regimes.
61
+ * **Rapid Lifetime Determination (RLD):** Computationally efficient method for real-time applications and high-frame-rate data.
62
+
63
+ ---
64
+
65
+ ## Installation
66
+
67
+ Install the stable version directly from PyPI:
68
+
69
+ ```bash
70
+ pip install pyfli-lib
@@ -0,0 +1,41 @@
1
+ # pyfli: A Unified Platform for FLI Data Processing
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
5
+ [![PyPI version](https://img.shields.io/pypi/v/pyfli-lib.svg)](https://pypi.org/project/pyfli-lib/)
6
+
7
+ `pyfli` is a comprehensive library designed for **Fluorescence Lifetime Imaging (FLI)** data processing. It streamlines the workflow for handling diverse file formats from various hardware manufacturers and provides a standardized pipeline for both traditional analytical and deep-learning-based inference.
8
+
9
+ ---
10
+
11
+ ## Key Features
12
+
13
+ * **Universal Processing Pipeline:** Simplifies the handling of multiple FLI file types (ICCD, SPAD, TCSPC).
14
+ * **Enhanced FLI Simulator:** A robust simulation engine adaptable to specific camera hardware parameters and noise models.
15
+ * **Standardized Inference:** Unified interface for time-resolved microscopy and macroscopic FLI data (MFLI).
16
+
17
+ ## Supported Data Acquisition Methods
18
+
19
+ The platform provides native support for several high-end imaging systems:
20
+
21
+ 1. **ICCD:** Intensified Charge-Coupled Device cameras for fast-gated, wide-field imaging.
22
+ 2. **SwissSPAD2 & SwissSPAD3:** High-speed SPAD (Single-Photon Avalanche Diode) architectures for high-resolution photon counting.
23
+ 3. **SPCImage/TCSPC:** Standardized processing for Time-Correlated Single Photon Counting microscopy data.
24
+
25
+ ## Data Processing & Analysis
26
+
27
+ `pyfli` implements industry-standard analytical methods to extract lifetime information:
28
+
29
+ * **Non-linear Least Squares (NLLS) Fitting:** Robust mathematical approach for exponential decay modeling.
30
+ * **Phasor Plot Analysis:** Graphical, model-free transformation of fluorescence decay into a 2D polar plot for easy species separation.
31
+ * **Maximum Likelihood Estimation (MLE):** Statistical estimator optimized for low-photon regimes.
32
+ * **Rapid Lifetime Determination (RLD):** Computationally efficient method for real-time applications and high-frame-rate data.
33
+
34
+ ---
35
+
36
+ ## Installation
37
+
38
+ Install the stable version directly from PyPI:
39
+
40
+ ```bash
41
+ pip install pyfli-lib
@@ -0,0 +1,47 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pyfli-lib"
7
+ version = "0.1.3"
8
+ description = "Unified Fluorescence Lifetime Imaging (FLI) data processing platform using analytical and deep learning methods."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ authors = [
12
+ {name = "Vikas Pandey"}
13
+ ]
14
+ # Core dependencies for the analytical methods
15
+ dependencies = [
16
+ "h5py>=3.10.0",
17
+ "sdtfile>=2025.0.0",
18
+ "tifffile>=2025.0.0",
19
+ "joblib>=1.3.0",
20
+ "scikit-image>=0.22.0",
21
+ "imagecodecs",
22
+ "opencv-python>=4.8.0",
23
+ "numpy>=1.24.0",
24
+ "matplotlib>=3.7.0"
25
+ ]
26
+
27
+ [project.optional-dependencies]
28
+ # Deep learning specific tools
29
+ ai = [
30
+ "tensorflow>=2.15.0",
31
+ "torch>=2.0.0",
32
+ ]
33
+ dev = [
34
+ "pytest",
35
+ "black",
36
+ "ipykernel>=6.0.0",
37
+ ]
38
+
39
+ [tool.setuptools.packages.find]
40
+ where = ["src"]
41
+ include = ["pyfli*"]
42
+ exclude = ["notebooks*", "config*", "data*"]
43
+
44
+ [project.urls]
45
+ Homepage = "https://github.com/vkp217/pyfli-pkg"
46
+ Repository = "https://github.com/vkp217/pyfli-pkg.git"
47
+ Issues = "https://github.com/vkp217/pyfli-pkg/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,22 @@
1
+ #### inside "pyfli.__init__.py"
2
+ __version__ = "0.1.0"
3
+
4
+ # Pulling everything from the scripts gatekeeper
5
+ from .scripts import (DataOperations, IRFAligner, DataViewer,
6
+ AlliGprocessedImport, BHprocessedImport, PyFliprocessedImport,
7
+ HardSimulator, HardestSimulator, DatasetPlotter,
8
+ PhasorAnalyzer, FLIFitter, PoissonLikelihoodFitter, FLIAnalysisSuite,
9
+ Plotter, DLModelComparator, DataPreprocessing,
10
+ BaseFLIFitter, Fli_CPUProcessor, Fli_GPUProcessor, MLEFLIFitter,
11
+ GlobalFLIFitter, ROIMaker, AnalyticalHelpers, DataIO_utils, Colorprocess)
12
+
13
+ __all__ = ['DataOperations', 'IRFAligner', 'DataViewer',
14
+ 'AlliGprocessedImport', 'BHprocessedImport', 'PyFliprocessedImport',
15
+ 'HardSimulator', 'HardestSimulator', 'DatasetPlotter',
16
+ 'PhasorAnalyzer', 'FLIFitter', 'PoissonLikelihoodFitter', 'FLIAnalysisSuite'
17
+ 'Plotter', 'DLModelComparator', 'DataPreprocessing',
18
+ 'MultiScaleRNNSummaryNet', 'BaseFLIFitter', 'Fli_CPUProcessor', 'Fli_GPUProcessor',
19
+ 'MLEFLIFitter', 'GlobalFLIFitter', 'ROIMaker', 'AnalyticalHelpers', 'DataIO_utils',
20
+ 'Colorprocess'
21
+ ]
22
+
@@ -0,0 +1,19 @@
1
+ #### inside "scripts.__init__.py"
2
+ from .dataIO import (DataOperations, AlliGprocessedImport,
3
+ BHprocessedImport, PyFliprocessedImport, DatasetPlotter, DataIO_utils )
4
+ from .analytical_methods import (PhasorAnalyzer, FLIFitter, PoissonLikelihoodFitter, FLIAnalysisSuite, AnalyticalHelpers)
5
+ from .dataCC import IRFAligner, DataPreprocessing
6
+ from .dataVnP import DataViewer, Plotter, DLModelComparator, Colorprocess
7
+ from .roiMaker import ROIMaker
8
+ from .solver import (BaseFLIFitter, Fli_CPUProcessor, Fli_GPUProcessor, MLEFLIFitter, GlobalFLIFitter)
9
+
10
+ from .simulatorPhysics import HardSimulator, HardestSimulator
11
+ # This allows: from pyfli.scripts import DataViewer
12
+ __all__ = ["DataOperations", "IRFAligner", "DataViewer", "AlliGprocessedImport",
13
+ "BHprocessedImport", "PyFliprocessedImport", "DatasetPlotter", "HardSimulator",
14
+ "HardestSimulator", "FLIFitter", "PoissonLikelihoodFitter", "FLIAnalysisSuite",
15
+ "PhasorAnalyzer", "Plotter", "DLModelComparator", "DataPreprocessing",
16
+ "BaseFLIFitter", "Fli_CPUProcessor", "Fli_GPUProcessor", "MLEFLIFitter", "GlobalFLIFitter",
17
+ "ROIMaker", "AnalyticalHelpers", "DataIO_utils", "Colorprocess"
18
+ ]
19
+
@@ -0,0 +1,4 @@
1
+ ### inside analytical_methods
2
+ from .phasor import PhasorAnalyzer
3
+ from .nlsf import FLIFitter, PoissonLikelihoodFitter, FLIAnalysisSuite
4
+ from .am_utils import AnalyticalHelpers
@@ -0,0 +1,15 @@
1
+ import numpy as np
2
+
3
+ class AnalyticalHelpers:
4
+ def __init__(self, laser_period = 12.5, gate_delay=None, num_gate = None):
5
+ self.laser_period = laser_period
6
+ self.gate_delay = gate_delay
7
+ self.num_gate = num_gate
8
+
9
+ def freq_computation(self):
10
+ freq = 1000.0/self.laser_period # laser_period in ns; freq in Hz
11
+ if self.gate_delay is None or self.num_gate is None:
12
+ effective_freq = freq
13
+ else:
14
+ effective_freq = 1000.0/(self.num_gate*self.gate_delay) # frequency is computed in the MHz if the gate delays are in ns
15
+ return [freq, effective_freq]
@@ -0,0 +1,2 @@
1
+ import numpy as np
2
+ import matplotlib.pyplot as plt