NoisyDetector¶
-
class
hcipy.optics.
NoisyDetector
(detector_grid, dark_current_rate=0, read_noise=0, flat_field=0, include_photon_noise=True, subsampling=1)¶ Bases:
hcipy.optics.detector.Detector
A detector class that has some basic noise properties.
A detector that includes the following noise sources: photon shot noise, dark current shot noise, flat field errors and read noise. These noise sources (except for photon shot noise) can be either a scalar (same for entire grid) or an array. For the flat field error specifically: if a scalar is given, a normal distributed flat field map (given scalar is standard deviation about 1) is generated that will be used - if an array is given, that array will be used, so it will NOT be a normal distributed flat field where every point in array gives the standard deviation. This allows the user to load a specific flat field map.
The detector can also integrate supersampled wavefronts and subsample them to the correct grid size. This allows for the averaging of the power over one detector pixel.
- Parameters
- detector_gridGrid
The grid on which the detector samples.
- dark_current_ratescalar or array_like
An array or scalar that gives dark current rate in counts per unit time for each point in the grid.
- read_noisescalar or array_like
An array or scalar that gives the rms read noise counts for each point in the grid.
- flat_fieldscalar or array_like
An array or scalar that gives the flat field error for each point in the grid. If a scalar is given, a random normal distributed flat field map (given scalar is standard deviation about 1) is generated that will be used.
- include_photon_noiseboolean
Turns the photon noise on or off. Default: True.
- subsamplinginteger or scalar or ndarray
The number of subpixels per pixel along one axis. For example, a value of 2 indicates that 2x2=4 subpixels are used per pixel. If this is a scalar, it will be rounded to the nearest integer. If this is an array, the subsampling factor will be different for each dimension. Default: 1.
Attributes Summary
Methods Summary
integrate
(wavefront, dt[, weight])Integrates the detector.
read_out
()Reads out the detector.
Attributes Documentation
-
flat_field
¶
Methods Documentation
-
integrate
(wavefront, dt, weight=1)¶ Integrates the detector.
The amount of power and dark current that the detector generates are calculated for a given integration time and weight.
- Parameters
- wavefrontWavefront or array_like
The wavefront sets the amount of power generated per unit time.
- dtscalar
The integration time in units of time.
- weightscalar
Weight of every unit of integration time.
-
read_out
()¶ Reads out the detector.
The read out operation of the detector. This means that, if applicable, first photon noise will be included to the power. Then, in this order, the flat field error and read-out noise are applied. After the read out the power is reset.
- Returns
- Field
The final detector image.