pyfli.analysis.load_results#
Load saved PyFLI fitting sessions and inject derived analysis results.
This module belongs to pyfli.analysis and is part of PyFLI post-processing,
diagnostics, statistical comparison, and result-loading utilities for fitted FLI/FLIM
datasets. Public API includes functions load_session_arrays(),
scan_session_results(), load_fitting_results(),
save_laguerre_result(), inject_phasor_result(), and
add_mean_lifetime().
Functions
|
Add mean lifetime. |
|
Inject phasor result. |
|
Load fitting results using a user-defined filename → label mapping. |
|
Load clean_decay, clean_irf, and final_mask from a pf_Analysis session directory. |
|
Save laguerre result. |
|
Scan session results. |
- load_session_arrays(save_dir)[source]#
Load clean_decay, clean_irf, and final_mask from a pf_Analysis session directory.
- scan_session_results(save_dir)[source]#
Scan session results.
- Parameters:
save_dir (
str) – Directory where outputs are saved.- Returns:
Session result arrays discovered from the output folder.
- Return type:
np.ndarray
- load_fitting_results(save_dir, experiments)[source]#
Load fitting results using a user-defined filename → label mapping.
- Parameters:
save_dir (
str) – Path to the pf_Analysis session folder.experiments (
dict[str,str]) –Maps each .npy filename to a short display label. You control exactly which results are loaded and in what order. Mix any model types freely (NLSF, MLE, Laguerre, FBI, etc.).
Example — mono-exponential, CPU only:
experiments = { 'CPU_NLSF_least_squares_mono-exponential.npy': 'NLSF', 'CPU_MLE_poisson_mono-exponential.npy': 'MLE', 'Laguerre Results_mono-exponential.npy': 'Laguerre', }
Example — bi-exponential, selective:
experiments = { 'CPU_NLSF_least_squares_bi-exponential.npy': 'NLSF-bi', 'GPU_MLE_poisson_bi-exponential.npy': 'MLE-GPU-bi', }
- Returns:
all_datasets (
list[dict] parameter maps (tau_map,alpha1_map,))all_fitset (
list[dict] TR maps (fit_map,residual_map))names (
list[str] labels matching each entry,in dict order)
- Return type:
- save_laguerre_result(saver, lag_results, model_type)[source]#
Save laguerre result.
- Parameters:
saver (
Any) – Optional saver used to persist messages or figures.lag_results (
np.ndarray) – Laguerre deconvolution results written into the saver.model_type (
str) – FLI/FLIM model family, such as mono- or bi-exponential.
- Returns:
No object is returned; the function save laguerre result.
- Return type:
- inject_phasor_result(tau_map_ns, all_datasets, all_fitset, names, label='Phasor')[source]#
Inject phasor result.
- Parameters:
tau_map_ns (
np.ndarray) – Lifetime map in nanoseconds.all_datasets (
np.ndarray) – Collection of fitted datasets to classify, compare, or summarize.all_fitset (
np.ndarray) – Collection of fit-result dictionaries used for comparison or plotting.names (
Any) – Dataset names used in summaries and plots.label (
str) – Display label assigned to the data or plot element.
- Returns:
No object is returned; the function inject phasor result.
- Return type: