pyfli.solver.cpu_processor#
Process FLI image cubes on CPU with parallel pixel-level fitting.
This module belongs to pyfli.solver and is part of PyFLI least-squares, maximum-
likelihood, CPU, GPU, binned, and global FLI fitting routines. Public API includes
classes FLICPUProcessor.
Classes
|
Run pixel-wise FLI fitting on CPU. |
- class FLICPUProcessor(freq, fitter_class)[source]#
Bases:
objectRun pixel-wise FLI fitting on CPU. The processor parallelizes fitting across image pixels, reconstructs parameter maps, saves results, and loads saved maps.
- Parameters:
freq (
float) – Acquisition frequency information used to derive timing constants.fitter_class (
Any) – Fitter class instantiated by the processor.
- process_image(image_cube, irf_cube, mask=None, data_name='FLIM_Dataset', model_type='bi-exponential', estimator='least_squares', p0=None, bounds=None, n_jobs=-1, backend='loky', fit_indices=None, **kwargs)[source]#
Process image.
- Parameters:
image_cube (
np.ndarray) – Time-resolved decay image cube.irf_cube (
np.ndarray) – Instrument response cube aligned with the decay image cube.mask (
np.ndarray | None) – Boolean or labeled mask selecting pixels for the operation.data_name (
str) – Label assigned to the fitted or processed dataset.model_type (
str) – FLI model family, such as mono- or bi-exponential.estimator (
str) – Estimator name used to choose a fitting objective.p0 (
Any | None) – Initial parameter vector supplied to the optimizer.bounds (
np.ndarray | None) – Lower and upper parameter bounds supplied to the optimizer.n_jobs (
int) – Number of parallel jobs used for CPU fitting.backend (
str) – Joblib execution backend used for parallel CPU fitting.fit_indices (
tuple[int,int] | None) – Optional (gate_num_start, gate_num_end) gate range to fit over, e.g. to focus on the tail of the decay.Nonefits the full trace.**kwargs (
Any) – Additional keyword options forwarded to the underlying implementation.
- Returns:
Object produced by process image.
- Return type:
Any