control — functions
Telling the camera what to do, grouped the way the SDK groups it.
The C++ Imager is decomposed into sub-interfaces -- Radiometry,
Detector, Optics, Processing -- and this module is the same
decomposition, reached as camera.radiometry, camera.detector,
camera.optics and camera.processing. The grouping is not
decoration: it is what makes "which of these 188 methods are about the
lens" answerable.
Two shapes recur and both are worth knowing before reading any of it.
Whole-record setters read first.
Radiometry.set and Detector.set_auto_nuc write every
field they carry. Building a fresh record and setting the one field
you care about therefore writes defaults over every setting you did
not think about. Read, change, write::
radiation = camera.radiometry.get()
radiation.emissivity = 0.95
camera.radiometry.set(radiation)
RadiationConfig is returned by get() and accepted by
set() for exactly that reason.
Ask before doing. Most of Optics raises
optris_sdk.NotSupportedError on a camera with no focus
motor. Optics.capability is the only call that answers on
every camera, and branching on it is the point -- a user interface
must never have to discover a missing feature by catching.
Optics.is_focusable is the predicate to use, not
capability != FOCUS_FIXED: FOCUS_UNKNOWN means the question
has no answer yet, and treating that as "yes" is the defect the
three-state answer replaced.
flag_while_recording_name(policy)
'use', 'avoid' or 'avoid_unless_drift'.
focus_capability_name(capability)
'unknown', 'fixed' or 'motorized'.
optics_unit_name(unit)
'unknown', 'degrees' or 'millimetres'.
optics_unit_symbol(unit)
What to print after OperationMode.optics_fov.
'deg', 'mm', or '' when the unit is not known --
labelling an unknown unit as degrees is exactly the bug this
answers, so there is no fallback.
chip_heating_name(mode)
'floating', 'auto' or 'fixed'.
shutter_state_name(state)
A shutter state, spelled out rather than as an ordinal.
nuc_cycle_outcome_name(outcome)
A shutter cycle's outcome, spelled out.
shutter_correction_outcome_name(outcome)
A process-interface correction's outcome, spelled out.
reference_correction_support_name(support)
A reference-correction support verdict, spelled out.
emissivity_conversion_support_name(support)
An emissivity-conversion support verdict, spelled out.
is_focusable(capability)
Whether this camera has a focus motor that can be driven.
capability == FOCUS_MOTORIZED, written out because the
tempting spelling -- capability != FOCUS_FIXED -- treats
FOCUS_UNKNOWN as yes, and FOCUS_UNKNOWN means the question
has no answer yet rather than a positive one.
read_operation_modes(camera)
Every combination this camera offers.