Sensor Calibration¶
Each pixel’s own dark current and bias, from a real sensor’s calibration frames, for
CameraModelHandle.set_sensor_dark_current_map() and set_sensor_bias_map(). See
Sensor Modeling: From Spectral Flux to Digital Numbers.
- class huira.BiasMapKind¶
What the values of a bias map are (CameraModelHandle.set_sensor_bias_map()).
Members:
Absolute : Each pixel’s bias, in DN: a master bias frame. It replaces the bias level, which is not used while the map is set.
Relative : Each pixel’s offset from the bias level, in DN: the bias’s structure alone, averaging about 0. The bias level still applies, and changing it moves the whole map.
- Absolute = <BiasMapKind.Absolute: 0>¶
- Relative = <BiasMapKind.Relative: 1>¶
- __init__(self: huira._huira.BiasMapKind, value: int) None¶
- property name¶
- property value¶
- huira.dark_current_from_master_dark(*args, **kwargs)¶
Overloaded function.
dark_current_from_master_dark(master_dark: huira._huira.Image_f32, master_bias: huira._huira.Image_f32, conversion_gain: float, exposure_time: huira._huira.Second) -> huira._huira.Image_f32
The dark current of each pixel, in electrons per second, from a master dark and a master bias: (dark - bias) * conversion_gain / exposure_time, for CameraModelHandle.set_sensor_dark_current_map().
Both frames are in DN, as the camera that took them read them out, and conversion_gain is that camera’s, in e-/DN. master_bias is an image the size of the master dark, or one value in DN for every pixel. exposure_time is the master dark’s (any time unit, e.g. Second).
An image with a sensor_bit_depth (a sensor response, or a frame read from a file that records its counts’ bit depth) holds DN / (2^bits - 1) and is converted; any other image’s values are taken as DN, and one without a bit depth whose values are all at most 1 DN is refused as normalized (multiply a 32-bit float master from Siril or PixInsight by 65535). A pixel below the master bias, which noise does near zero dark current, gets 0; a warning counts them.
dark_current_from_master_dark(master_dark: huira._huira.Image_f32, master_bias: float, conversion_gain: float, exposure_time: huira._huira.Second) -> huira._huira.Image_f32
The dark current of each pixel, in electrons per second, from a master dark and a master bias: (dark - bias) * conversion_gain / exposure_time, for CameraModelHandle.set_sensor_dark_current_map().
Both frames are in DN, as the camera that took them read them out, and conversion_gain is that camera’s, in e-/DN. master_bias is an image the size of the master dark, or one value in DN for every pixel. exposure_time is the master dark’s (any time unit, e.g. Second).
An image with a sensor_bit_depth (a sensor response, or a frame read from a file that records its counts’ bit depth) holds DN / (2^bits - 1) and is converted; any other image’s values are taken as DN, and one without a bit depth whose values are all at most 1 DN is refused as normalized (multiply a 32-bit float master from Siril or PixInsight by 65535). A pixel below the master bias, which noise does near zero dark current, gets 0; a warning counts them.