pyfli.analysis.phasor_analysis#
Compute phasor coordinates from binned decay data and save phasor-derived lifetime maps.
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 compute_freq_axis(),
compute_phasor(), plot_phasor_figures(), and save_phasor_result().
Functions
|
Derive frequency and time axis from IRF array shape. |
|
Compute and calibrate phasor coordinates. |
|
Generate all standard phasor figures. |
|
Save phasor result. |
- compute_freq_axis(binned_irf, laser_period_ns=12.5)[source]#
Derive frequency and time axis from IRF array shape.
- compute_phasor(binned_decay, binned_irf, freq_hz, time_axis_ns, n_harmonics=3)[source]#
Compute and calibrate phasor coordinates.
- Parameters:
- Returns:
phasor_obj (
PhasorAnalyzer reuse this instance for all plotting calls)Gc, Sc (
np.ndarray (n_harmonics,H,W) calibrated phasor coordinates)tau_map_ns (
np.ndarray (H,W) apparent lifetime from 1st harmonic)
- Return type:
- plot_phasor_figures(phasor_obj, Gc, Sc, binned_decay, mask, colorset='jet', saver=None)[source]#
Generate all standard phasor figures.
Produces: phasor diagram, overlay subplots, harmonics plot (if ≥ 3 harmonics), pure phasor map, and traceable analysis.
- Parameters:
phasor_obj (
PhasorAnalyzer returned by compute_phasor())Gc (
np.ndarray (n_harmonics,H,W))Sc (
np.ndarray (n_harmonics,H,W))binned_decay (
np.ndarray (H,W,T))mask (
np.ndarray (H,W) bool)colorset (
str colormap name for hexbin density plots)saver (
DataSaverorNone)
- Returns:
figs
- Return type:
dict[str,Figure] keyed by figure name
- save_phasor_result(save_dir, tau_map_ns, saver=None)[source]#
Save phasor result.
- Parameters:
save_dir (
str) – Directory where outputs are saved.tau_map_ns (
np.ndarray) – Lifetime map in nanoseconds.saver (
Any | None) – Optional saver used to persist messages or figures.
- Returns:
Saved phasor result arrays or metadata.
- Return type:
np.ndarray