scopesim.effects.electronic module¶
Electronic detector effects - related to detector readout.
Classes:
- DetectorModePropertiesSetter - set parameters for readout mode
- AutoExposure - determine DIT and NDIT automatically
- SummedExposure - simulates a summed stack of ndit
exposures
- PoorMansHxRGReadoutNoise - simple readout noise for HAWAII detectors
- BasicReadoutNoise - readout noise
- ShotNoise - realisation of Poissonian photon noise
- DarkCurrent - add dark current
- LinearityCurve - apply detector (non-)linearity and saturation
- ReferencePixelBorder
- BinnedImage
- UnequalBinnedImage
- Bias - adds constant bias level to readout
Functions: - make_ron_frame - pseudo_random_field
- class scopesim.effects.electronic.AutoExposure(**kwargs)[source]¶
Bases:
Effect
Determine DIT and NDIT automatically from ImagePlane.
DIT is determined such that the maximum value in the incident photon flux (including astronomical source, sky and thermal backgrounds) fills the full well of the detector (
!DET.full_well
) to a given fraction (!OBS.autoexposure.fill_frac
). NDIT is determined such thatDIT
*NDIT
results in the requested exposure time.The requested exposure time is taken from
!OBS.exptime
.The effects sets the parameters !OBS.dit and !OBS.ndit.
Examples
The parameters !OBS.exptime, !DET.full_well and !DET.mindit should be defined as properties in the respective subsections.
name: auto_exposure description: automatic determination of DIT and NDIT class: AutoExposure include: True kwargs: fill_frac: "!OBS.auto_exposure.fill_frac"
- estimate_dit_ndit(exptime: float, image_plane_max: float, **kwargs) tuple[float, int] [source]¶
Automatically determine DIT and NDIT from exposure time.
- Parameters:
- exptimefloat
Exposure time in seconds.
- image_plane_maxfloat
Maximum pixel value from image plane, used to avoid saturation.
- Returns:
- ditfloat
Detector Integration Time.
- nditint
Number of Integrations.
- required_keys = {'fill_frac', 'full_well', 'mindit'}¶
- class scopesim.effects.electronic.BasicReadoutNoise(**kwargs)[source]¶
Bases:
Effect
Readout noise computed as: ron * sqrt(NDIT).
- required_keys = {'ndit', 'noise_std'}¶
- class scopesim.effects.electronic.Bias(**kwargs)[source]¶
Bases:
Effect
Adds a constant bias level to readout.
- required_keys = {'bias'}¶
- class scopesim.effects.electronic.BinnedImage(**kwargs)[source]¶
Bases:
Effect
- required_keys = {'bin_size'}¶
- class scopesim.effects.electronic.DarkCurrent(**kwargs)[source]¶
Bases:
Effect
required: dit, ndit, value
- required_keys = {'dit', 'ndit', 'value'}¶
- class scopesim.effects.electronic.DetectorModePropertiesSetter(**kwargs)[source]¶
Bases:
Effect
Set mode specific curr_sys properties for different detector readout modes.
A little class (
DetectorModePropertiesSetter
) that allows different"!DET"
properties to be set on the fly.- Parameters:
- mode_propertiesdict
A dictionary containing the DET parameters to be changed for each mode. See below for an example yaml entry.
Examples
Add the values for the different detector readout modes to all the relevant detector yaml files. In this case the METIS HAWAII (L, M band) and GeoSnap (N band) detectors: METIS_DET_IMG_LM.yaml , METIS_DET_IMG_N.yaml
- name: lm_detector_readout_parameters class: DetectorModePropertiesSetter kwargs: mode_properties: fast: mindit: 0.04 full_well: !!float 1e5 ron: 70 slow: mindit: 1.3 full_well: !!float 1e5 ron: 14
Add the OBS dict entry !OBS.detector_readout_mode to the properties section of the mode_yamls descriptions in the default.yaml files.
mode_yamls: - object: observation alias: OBS name: lss_l yamls: ... properties: ... detector_readout_mode: slow
- required_keys = {'mode_properties'}¶
- class scopesim.effects.electronic.LinearityCurve(**kwargs)[source]¶
Bases:
Effect
Detector linearity effect.
The detector linearity curve is set in terms of incident flux (e/s) and measured detector values (ADU).
Examples
The effect can be instantiated in various ways.:
- name: detector_linearity class: LinearityCurve kwargs: filename: FPA_linearity.dat - name: detector_linearity class: LinearityCurve kwargs: array_dict: {incident: [0, 77000, 999999999999], measured: [0, 77000, 77000]} - name: detector_linearity class: LinearityCurve kwargs: incident: [0, 77000, 99999999] measured: [0, 77000, 77000]
- required_keys = {'ndit'}¶
- class scopesim.effects.electronic.PoorMansHxRGReadoutNoise(**kwargs)[source]¶
Bases:
Effect
- required_keys = {'n_channels', 'ndit', 'noise_std'}¶
- class scopesim.effects.electronic.Quantization(**kwargs)[source]¶
Bases:
Effect
Converts raw data to whole photons.
- class scopesim.effects.electronic.SummedExposure(**kwargs)[source]¶
Bases:
Effect
Simulates a summed stack of
ndit
exposures.- required_keys = {'dit', 'ndit'}¶
- class scopesim.effects.electronic.UnequalBinnedImage(**kwargs)[source]¶
Bases:
Effect
- required_keys = {'binx', 'biny'}¶