Sensor
- class wcc_etc.sensor.Sensor(bandpass, pixel_size, read_noise, dark_current, gain, area, temperature=None, qe=1, well_depth=None, bit_depth=None, bias_level=None, meta={})[source]
Bases:
_MetaHolder_A class representing the sensor (detector) properties.
- Variables:
bandpass (SpectralElement) – The total throughput (filter + sensor QE + telescope optics).
wavelength (Quantity) – The pivot wavelength of the bandpass (filter-only; the PSF is rendered at the source-weighted Simulation.effective_wavelength instead).
area (Quantity) – The total area of the sensor.
gain (Quantity) – The sensor gain (e-/ADU).
dark_current (Quantity) – The dark current (e-/s/pix).
read_noise (Quantity) – The read noise (e-/pix).
pixel_size (Quantity) – The pixel size (microns/pix).
bit_depth (int or None) – The ADC bit depth. None if not configured.
bias_level (Quantity) – The additive bias/offset level in ADU.
adc_max (Quantity) – The ADC full-scale clip ceiling in ADU.
- classmethod from_name(name, gain_mode=None)[source]
Create a Sensor instance from a name string ‘kind:band’.
- classmethod from_config(config_or_name)[source]
Create a Sensor instance from a configuration or name.
- classmethod from_kind_and_band(kind, band, gain_mode=None)[source]
Load the instance given the detector kind and filter.
- Parameters:
- Return type:
- set_bandpass(bandpass)[source]
Set the sensor bandpass.
- Parameters:
bandpass (str or SpectralElement)
- get_plate_scale(telescope)[source]
Calculate the plate scale in arcsec/pix.
- Parameters:
telescope (Telescope) – The telescope object.
- Returns:
The plate scale in arcsec/pix.
- Return type:
Quantity
- show(ax=None, label=None, **kwargs)[source]
Plot the sensor’s filter throughput curve.
- Parameters:
ax (matplotlib.axes.Axes, optional) – Axes to plot on. If None, a new figure is created.
label (str, optional) – Legend label, passed to ax.plot.
**kwargs – Keyword arguments passed to ax.plot.
- Returns:
The figure and the axis drawn on.
- Return type:
(fig, ax)
- plot(ax=None, label=None, **kwargs)
Plot the sensor’s filter throughput curve.
- Parameters:
ax (matplotlib.axes.Axes, optional) – Axes to plot on. If None, a new figure is created.
label (str, optional) – Legend label, passed to ax.plot.
**kwargs – Keyword arguments passed to ax.plot.
- Returns:
The figure and the axis drawn on.
- Return type:
(fig, ax)
- property bandpass
The sensor bandpass (SpectralElement).
- property wavelength
The pivot wavelength of the bandpass – a property of the filter alone.
The pivot wavelength is preferred over the peak-transmission wavelength (
wpeak):wpeakreturns the wavelength of maximum throughput, which for a roughly flat-topped filter is essentially arbitrary within the band, while the pivot wavelength is the photometrically meaningful effective wavelength of the bandpass and is independent of where the throughput happens to peak.It is, however, computed from the throughput curve and nothing else, so it is the same for every source: 582 nm through the WCC broad band whether the star is an O5V or an M5V, even though the photons those two actually deliver through that band average 541 nm and 716 nm. Since the diffraction scale is linear in wavelength, the PSF is rendered at
wcc_etc.Simulation.effective_wavelength– the source-weighted wavelength – and not at this pivot (issue #65). Use this for filter-level bookkeeping, not for anything that has to know the source colour.See also
wcc_etc.spectral.effective_wavelengththe source-weighted counterpart.
- property area
The sensor area.
- property gain
The sensor gain (e-/ct).
- property dark_current
The dark current (e-/s/pix).
- property read_noise
The read noise (e-/pix).
- property pixel_size
The pixel size (um/pix).
- property bit_depth
The ADC bit depth (int), or None if not configured.
- property bias_level
The additive bias/offset level in ADU (u.ct). Defaults to 0.
- property adc_max
2**bit_depth - 1.
- Type:
The ADC full-scale (clip ceiling) in ADU (u.ct)
- property saturation_e
the smaller of the full well (meta[‘well_depth’]) and the charge at which the ADC clips, (adc_max - bias_level) * gain. Bias consumes ADC headroom; it does not raise the well. Every saturation API compares electrons to this (#64).
- Type:
The per-frame saturation ceiling in electrons
- property saturation_limit
‘well’ (full well) or ‘adc’ (ADC clip).
- Type:
Which limit binds in saturation_e