optris_sdk_simulated_raw_detector
Give a simulated camera a radiometrically meaningful detector.
A simulated camera runs the real processing pipeline either way. This switches which calibration it runs through, and that decides what the pipeline can be used to measure.
Off, the camera runs on a synthetic identity calibration: unity gain, a straight-line characteristic curve, a flat field that is flat. Every stage runs and costs what it costs, but the scene comes back unchanged because nothing in the calibration moves a pixel.
On, the camera gets a calibration with physics in it -- a plausible characteristic curve, a cos^4 flat field, per-pixel gain and offset spread, dead pixels, and an optic -- and the scene is treated as a radiance field inverted into the counts a detector would have produced. The radiometry, flat field, dead-pixel substitution, size-of-source and distortion correction then become measurable rather than merely exercised.
A camera that cannot build it fails to open rather than falling back, because the fallback would report success for a frame that measured nothing.
Public attributes
struct_size
uint32_t struct_size
Size of this struct as the caller compiled it.
Nested structs on this surface carry their own size for the same reason the outer ones do, and this one had none: twelve fields, no struct_size, no reserved word, sitting as the LAST member of a versioned struct. So the only size describing it was its parent's, and any field added here would have moved sizeof(optris_sdk_simulated_config) without anything in this struct being able to say which layout a caller meant.
optris_sdk_simulated_config_init() stamps it, the way that function stamps operation_mode inside optris_sdk_camera_options and capabilities inside optris_sdk_device_info, so a caller filling in the raw-detector mode needs no second call and does not have to know it would have needed one. Nothing takes a pointer to one of these on its own, which is why it has no _init of its own.
New in version 34, and it cost nothing: pixel_pitch_mm below is a double at offset 16 and the three fields before it fill only 12, so this field went into alignment padding that was already there. sizeof is unchanged at 576, and so is sizeof(optris_sdk_simulated_config) and every offset in it. What did move is the three fields below this one, each by four bytes, so a program built against version 33 must still be rebuilt.
enabled
int32_t enabled
Non-zero switches the mode on. Everything else here is ignored while it is zero.
calibration_serial
uint32_t calibration_serial
Serial the calibration files are named for. Zero takes the camera's own serial.
fov
int32_t fov
Field of view the calibration files are named for, in degrees. Zero takes a 60 degree optic.
pixel_pitch_mm
double pixel_pitch_mm
Detector pitch in millimetres, for reading the Zemax listing. Zero takes 0.017.
correct_distortion
int32_t correct_distortion
Pipeline stages to switch on. Off by default for the same reason the mode is: a camera that quietly corrected something would make the correction impossible to see. Non-zero runs the distortion correction, so the picture is corrected for the optic rather than left as the detector saw it.
rdc_wide
int32_t rdc_wide
Non-zero corrects in wide mode, which reaches further into the corners and leaves a border the optic cannot measure.
sos_enabled
int32_t sos_enabled
Non-zero runs the size-of-source correction.
sos_strength
float sos_strength
How much of the size-of-source correction to apply, 0 to 1.
sos_kernel_px
uint32_t sos_kernel_px
Size-of-source kernel width in pixels.
read_noise_adu
double read_noise_adu
Detector read noise, 1 sigma in counts. Zero keeps a run reproducible, which is what a gate needs.
calibration_dir
char calibration_dir[OPTRIS_SDK_MAX_PATH]
Calibration directory holding Cali-<serial>.xml, the .dat and the .prn, UTF-8. Empty writes a synthetic one and uses that.
zemax_distortion_path
char zemax_distortion_path[OPTRIS_SDK_MAX_PATH]
A Zemax field-curvature listing to take the optic from, UTF-8. Empty means a rectilinear optic, which distorts nothing.