Configuration and sensors

Detectors, the telescope, and astrophysical defaults are described by TOML configuration files bundled with the package under src/wcc_etc/data/config/. Notebooks and scripts can also override any of these values on the fly with update().

Sensor strings

Sensors are addressed as "kind:band". The canonical kinds are zwo (Sony IMX455) and qcmos (Hamamatsu qCMOS); sony, imx and imx455 are accepted nicknames for zwo in from_sensor_and_scene(), but from_sensorfilter() takes only the canonical form. The available combinations:

String

Detector

Notes

zwo:u / zwo:g / zwo:r / zwo:i / zwo:z / zwo:bb

Sony IMX455 (ZWO ASI6200MM), in focus

16-bit, 3.76 µm pixels. adc_max = 65535; the ~16.3 ke- full well binds before the ADC.

zwo:r+1 / zwo:r-1 / zwo:bb2

Sony IMX455, defocused

The same detector one wave either side of focus (+1 / -1) and two waves out (2); from_sensorfilter picks the matching DefocusPSF.

qcmos:u / qcmos:g / qcmos:r / qcmos:i / qcmos:z / qcmos:bb

Hamamatsu qCMOS (HWK4123)

12-bit, 4.6 µm pixels, adc_max = 4095. Two gain modes, selected with gain_mode=: "high" (32x, 7.42 ADU/e, 0.25 e read noise, default; the ADC clips at 552 e) or "low" (1x, 0.242 ADU/e, 2.33 e read noise; the 7500 e well clips first).

The zwo and hwk configs back the Sony and qCMOS sensors respectively.

Note

The H-alpha bands zwo:halpha2 / zwo:halpha6 / zwo:halpha20 (2, 6 and 20 nm wide) have EOL throughput files. zwo:hbeta / zwo:heii exist as placeholders but have no throughput file yet, so they are not usable until those CSVs are added. qcmos:r has a throughput curve but no position in the WCC filter layout, so it works with from_sensor_and_scene but not with from_sensorfilter.

The configuration files

File

Contents

zwo.toml

Sony IMX455 detector: pixel size, gain setting, sensor area, bias level, bit depth, and paths to the dark-current, gain, read-noise, and well-depth CSV calibration curves.

qcmos.toml

Hamamatsu qCMOS detector (12-bit), the same structure as zwo.toml plus gain_mode and a [sensor.gain_modes.<mode>] table per mode.

lazuli.toml

Telescope: primary diameter (3.065 m), focal ratio (f/15), pointing jitter (10 mas), and the default zodiacal background magnitude.

astro.toml

Astrophysical defaults, e.g. the background surface brightness.

Example: the Sony detector config

[sensor]
pixel_size   = 3.76     # micron / pix
gain_setting = 100      # 0.1 dB
sensor_temp  = 0.0      # C
sensor_area  = 864      # mm^2  (36 mm x 24 mm)
bias_level   = 0        # ADU, additive offset
bit_depth    = 16       # ADC bit depth; adc_max = 2^bit_depth - 1
path_dark_current = "sensors/.../Dark_Current_vs_Sensor_Temperature.csv"
path_gain_curve   = "sensors/.../Gain_vs_Gain_Setting.csv"
path_read_noise   = "sensors/.../Read_Noise_vs_Gain_Setting.csv"
path_well_depth   = "sensors/.../Well_Depth_vs_Gain_Setting.csv"

Example: the telescope config

[telescope]
diameter_primary = 3.065   # m
f_num            = 15.0    # unitless
jitter_sigma     = 10      # mas

[zodi]
zodi_mag_r = 22.5

Overriding configuration at runtime

You do not need to edit the TOML files to explore parameter changes. Use update with element__key syntax:

sim.update(telescope__jitter_sigma=15)     # mas
sim.update(sensor__gain_setting=200)
sim.update(source__mag=22)

Reading configs programmatically

Lower-level helpers are exported for working with the configs directly:

from wcc_etc import read_config, get_sensor_config

cfg = get_sensor_config("sony", "r")    # the resolved sensor config dict
tel = read_config("lazuli", source="config")