pyfli.phasor.phasorSEPL.locus#
locus.py#
Build Single-Exponential Phasor Locus (SEPL) arrays — the parametric curve traced in the (g, s) plane as τ sweeps from 0 to ∞.
The term “SEPL” (pronounced sepal) was introduced by Michalet 2021 for all such curves, whether they are the canonical universal semicircle or deformed variants arising from gating / binning / truncation.
Functions
|
Compute SEPL curves for a list of configs in one call. |
|
Compute the full SEPL for the given acquisition configuration. |
Analytically compute the circle centre (gc, sc) and radius r of the discrete SEPL L_N (Michalet 2021, Sec. |
|
|
Return a non-uniform τ grid in [tau_min_ns, tau_max_ns]. |
|
Return (g, s) coordinates of the universal semicircle. |
- tau_grid(cfg, power=1.5)[source]#
Return a non-uniform τ grid in [tau_min_ns, tau_max_ns].
The grid is denser at small τ (where the locus curves sharply near (1,0)) using a power-law spacing.
- Parameters:
cfg (
AcquisitionConfig)power (
float) – Exponent for the nonlinear spacing. 1.0 = linear; >1 = finer at small τ.
- Returns:
tau
- Return type:
1-D ndarray (length = cfg.n_tau_pts)
- build_locus(cfg, *, tau=None, filter_finite=True)[source]#
Compute the full SEPL for the given acquisition configuration.
- Parameters:
cfg (
AcquisitionConfig) – Fully describes the experiment (mode, T, harmonic, gates, …).tau (
1-D array, optional) – Custom τ grid in ns. If None,tau_grid(cfg)is used.filter_finite (
bool) – If True (default), remove any (g, s) pairs where either component is non-finite (NaN / ±Inf). Useful for modes that become undefined at τ → 0 for certain parameter sets.
- Returns:
g (
1-D ndarray) – Real phasor coordinate.s (
1-D ndarray) – Imaginary phasor coordinate.tau (
1-D ndarray) – Corresponding lifetime values in ns.
- Return type:
tuple[NDArray[float64], NDArray[float64], NDArray[float64]]
- build_loci(cfgs, **kwargs)[source]#
Compute SEPL curves for a list of configs in one call.
Useful for overlaying several acquisition scenarios on the same plot.
- Parameters:
cfgs (
list[AcquisitionConfig])kwargs (
passed verbatimtobuild_locus.)
- Return type:
listof(g,s,tau) tuples,same order as *cfgs*.
- universal_semicircle(n_pts=300)[source]#
Return (g, s) coordinates of the universal semicircle.
- The universal semicircle is defined by
(g − ½)² + s² = (½)², s ≥ 0
- and is parameterised by the angle θ ∈ [0, π]:
g = ½ + ½·cos(θ), s = ½·sin(θ)
- Parameters:
n_pts (
int) – Number of samples (default 300).- Returns:
g, s
- Return type:
1-D ndarray
- sepl_center_radius_discrete(cfg)[source]#
Analytically compute the circle centre (gc, sc) and radius r of the discrete SEPL L_N (Michalet 2021, Sec. III C 1).
For a binned PSED with N bins and harmonic n, the phasor traces:
z_N(τ) = (1 − x) / (1 − x·e^{iφ})
where x = e^{−T/(N·τ)} and φ = 2π·n/N.
This Möbius transform of the real interval (0, 1) traces an arc of a circle with parameters (derived analytically by equating coefficients in the expanded circle equation):
gc = 1/2 sc = −(1/2) · tan(φ/2) r = √(gc² + sc²) = (1/2) / cos(φ/2)
The arc converges to the universal semicircle as N → ∞ (φ → 0).
- Parameters:
cfg (
AcquisitionConfig) – Requires: N_bins, harmonic.- Returns:
gc, sc, r – Circle centre coordinates and radius.
- Return type: