fouriax.DetectorArray#
- class DetectorArray(detector_grid, qe_curve=1.0, filter_mask=None, sum_wavelengths=True, channel_resolved=False, resample_method='linear', noise_model=None)#
Bases:
SensorGrid-based detector array with optional QE weighting and noise.
Integrates field intensity onto a coarser
detector_gridby binning field pixels into detector super-pixels. Supports per- wavelength quantum-efficiency curves, an optional pre-detection amplitude filter, and stochastic noise models.Output shape is
(*batch, [num_wavelengths,] [2,] det_ny, det_nx)depending onsum_wavelengthsandchannel_resolved.- Parameters:
detector_grid (Grid) – Detector pixel grid (typically coarser than the field grid).
qe_curve (Array | float | None) – Quantum efficiency — scalar, 1-D array of shape
(num_wavelengths,), orNone.filter_mask (AmplitudeMask | None) – Optional
AmplitudeMaskapplied to the intensity before integration.sum_wavelengths (bool) – Sum over the wavelength axis.
channel_resolved (bool) – Preserve per-polarisation channel intensities.
resample_method (Literal['nearest', 'linear']) – Interpolation method for detector binning.
noise_model (SensorNoiseModel | None) – Optional stochastic noise model.
- __init__(detector_grid, qe_curve=1.0, filter_mask=None, sum_wavelengths=True, channel_resolved=False, resample_method='linear', noise_model=None)#
- Parameters:
detector_grid (Grid)
qe_curve (Array | float | None)
filter_mask (AmplitudeMask | None)
sum_wavelengths (bool)
channel_resolved (bool)
resample_method (Literal['nearest', 'linear'])
noise_model (SensorNoiseModel | None)
- Return type:
None
Methods
__init__(detector_grid[, qe_curve, ...])expected(field)Return the deterministic detector-array signal before noise.
linear_operator(template, *[, flatten])Return the deterministic intensity-readout operator for this detector.
measure(field, *[, key])Return the detector-array readout, optionally with sampled noise.
sample(field, *, key)Sample the detector-array output with the configured noise model.
validate_for(field)Check that
fieldis compatible with this sensor.Attributes
- qe_curve: Array | float | None = 1.0#
- filter_mask: AmplitudeMask | None = None#
- sum_wavelengths: bool = True#
- channel_resolved: bool = False#
- resample_method: Literal['nearest', 'linear'] = 'linear'#
- noise_model: SensorNoiseModel | None = None#
- measure(field, *, key=None)#
Return the detector-array readout, optionally with sampled noise.
- expected(field)#
Return the deterministic detector-array signal before noise.
- Parameters:
field (Field | Intensity) – Input field or intensity. Field input is converted to spatial intensity before integration.
- Returns:
Array with shape
(*batch, det_ny, det_nx),(*batch, num_wavelengths, det_ny, det_nx),(*batch, 2, det_ny, det_nx), or(*batch, num_wavelengths, 2, det_ny, det_nx)depending onsum_wavelengthsandchannel_resolved.- Return type:
Array
- sample(field, *, key)#
Sample the detector-array output with the configured noise model.
- linear_operator(template, *, flatten=False)#
Return the deterministic intensity-readout operator for this detector.
The operator corresponds to
expected()onIntensityinput and does not include stochastic noise sampling.- Parameters:
template (Intensity)
flatten (bool)
- Return type:
LinearOperator