Detector¶
__init__ ¶
__init__(
nPix: int,
samplingTime: float,
fullWellCapacity: int = np.inf,
nBits: int = 12,
quantumEfficiency: float = 1,
shotNoise: bool = 0,
darkCurrent: float = 0,
readoutNoise: float = 0,
gain: float = 1,
quantization_conversion: float = 0,
sensorType: str = "CCD",
darkCalibration: bool = True,
noiseFlag: bool = True,
logger=None,
**kwargs,
)
Initialize a Detector object to simulate real detector effects like noise, saturation, and quantization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nPix
|
int
|
Resolution of the detector [px]. |
required |
samplingTime
|
float
|
Minimal sampling time for the camera [s]. |
required |
fullWellCapacity
|
int
|
Full Well Capacity of pixels [e-]. Default, np.inf. |
inf
|
nBits
|
int
|
Bit depth for quantization. Default is 12, shall be >= 8 |
12
|
quantumEfficiency
|
float
|
Quantum efficiency (0-1). Default is 1. |
1
|
shotNoise
|
bool
|
Shot noise flag. Default disabled, 0. |
0
|
darkCurrent
|
float
|
Dark current [e-]. Default disabled, 0. |
0
|
readoutNoise
|
float
|
Readout noise [e-]. Default disabled, 0. |
0
|
gain
|
float
|
Gain of the detector. Default is 1. |
1
|
quantization_conversion
|
float, optional.
|
Conversion gain to discretize the measurement [e-/px]. Default disabled, 0. |
0
|
sensorType
|
str
|
Sensor type ('CCD', 'CMOS', 'EMCCD'). Default is 'CCD'. |
'CCD'
|
darkCalibration
|
int
|
Number of frames to calibrate the dark. By default disabled, 0. |
True
|
noiseFlag
|
bool
|
If True, the detector adds noise using the params/default config. By default, True. |
True
|
logger
|
Logger
|
Logger instance for diagnostics. |
None
|
**kwargs
|
dict
|
Additional keyword arguments. randomState : int, optional Seed for the random number generator. Default is None. integrationTime : float, optional Integration time for the detector [s]. Default is None. |
{}
|
integrate ¶
Integrate the noise free frame, adding the corresponding noise.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_frame
|
ndarray
|
The noise-free frame to integrate. |
required |
input_photons
|
int
|
The number of photons received in the current sampling time. |
required |
Returns:
| Type | Description |
|---|---|
ndarray or None
|
The integrated frame with noise added, when the integration time is completed. If None, the integration is ongoing. |
readout ¶
Simulate the readout process of the detector including noises and quantification.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_frame
|
ndarray
|
The noise-free input frame. |
required |
photons
|
int or float
|
Number of incident photons. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
The simulated quantized and saturated frame. |