pyfli.irf_deconvolution.detector_weights#
Convert detector observations to expected photon rates and inverse-variance weights.
This module belongs to pyfli.irf_deconvolution and is part of PyFLI detector-
aware IRF deconvolution and joint FLI fitting utilities. Public API includes classes
TCSPCParams, SPADParams, and ICCDParams; functions
tcspc_to_lambda(), tcspc_lambda_weight(), spad_to_lambda(),
spad_lambda_weight(), iccd_to_lambda(), iccd_lambda_weight(),
generalized_anscombe(), and make_observation().
Functions
|
Run the generalized anscombe routine. |
|
Run the ICCD lambda weight routine. |
|
Run the ICCD to lambda routine. |
|
Create observation. |
|
Run the SPAD lambda weight routine. |
|
Run the SPAD to lambda routine. |
|
Run the TCSPC lambda weight routine. |
|
Run the TCSPC to lambda routine. |
Classes
|
Store ICCD detector weighting parameters. |
|
Store SPAD detector weighting parameters. |
|
Store TCSPC detector weighting parameters. |
- class TCSPCParams(n_ex=None)[source]#
Bases:
objectStore TCSPC detector weighting parameters. The optional excitation-count value is used to correct pile-up and inflate variance estimates.
- Parameters:
n_ex (
float | None) – Number of excitation opportunities used for pile-up or detector corrections.
- class SPADParams(n_ex)[source]#
Bases:
objectStore SPAD detector weighting parameters. The excitation-count value controls the conversion from observed binary detections to expected photon rates.
- Parameters:
n_ex (
float) – Number of excitation opportunities used for pile-up or detector corrections.
- class ICCDParams(G0, F2=2.0, sigma_r=0.0)[source]#
Bases:
objectStore ICCD detector weighting parameters. Gain, excess-noise factor, and read-noise standard deviation define the observation model used by IRF deconvolution.
- Parameters:
- tcspc_to_lambda(y, p)[source]#
Run the TCSPC to lambda routine.
- Parameters:
y (
np.ndarray) – Observed signal, target data, or coordinate array.p (
TCSPCParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by TCSPC to lambda.
- Return type:
Any
- tcspc_lambda_weight(lam, y, p)[source]#
Run the TCSPC lambda weight routine.
- Parameters:
lam (
np.ndarray) – Wavelength, spectral axis, or expected photon-rate array.y (
np.ndarray) – Observed signal, target data, or coordinate array.p (
TCSPCParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by TCSPC lambda weight.
- Return type:
Any
- spad_to_lambda(y, p)[source]#
Run the SPAD to lambda routine.
- Parameters:
y (
np.ndarray) – Observed signal, target data, or coordinate array.p (
SPADParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by SPAD to lambda.
- Return type:
Any
- spad_lambda_weight(lam, y, p)[source]#
Run the SPAD lambda weight routine.
- Parameters:
lam (
np.ndarray) – Wavelength, spectral axis, or expected photon-rate array.y (
np.ndarray) – Observed signal, target data, or coordinate array.p (
SPADParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by SPAD lambda weight.
- Return type:
Any
- iccd_to_lambda(y_adu, p)[source]#
Run the ICCD to lambda routine.
- Parameters:
y_adu (
np.ndarray) – ICCD observation in analog-to-digital units.p (
ICCDParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by ICCD to lambda.
- Return type:
Any
- iccd_lambda_weight(lam, y_adu, p)[source]#
Run the ICCD lambda weight routine.
- Parameters:
lam (
np.ndarray) – Wavelength, spectral axis, or expected photon-rate array.y_adu (
np.ndarray) – ICCD observation in analog-to-digital units.p (
ICCDParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by ICCD lambda weight.
- Return type:
Any
- generalized_anscombe(y_adu, p)[source]#
Run the generalized anscombe routine.
- Parameters:
y_adu (
np.ndarray) – ICCD observation in analog-to-digital units.p (
ICCDParams) – Detector parameter object or fitted parameter vector.
- Returns:
Object produced by generalized anscombe.
- Return type:
Any
- make_observation(y, detector, params)[source]#
Create observation.
- Parameters:
y (
np.ndarray) – Observed signal, target data, or coordinate array.detector (
str) – Detector model name used to select weighting or conversion logic.params (
Any) – Model, detector, or plotting parameters used by the routine.
- Returns:
Tuple containing simulated observations and associated ground-truth arrays.
- Return type:
tuple[Any,]