Optics
class optris_sdk.control.Optics
The lens, and the motor behind it: camera.optics.
Only some cameras have a focus motor. capability is the one
call here that answers on every camera; everything else raises
optris_sdk.NotSupportedError on a camera that has none.
Ask first.
Optics — properties
capability
FOCUS_MOTORIZED, FOCUS_FIXED or FOCUS_UNKNOWN.
Three states, not two. FOCUS_UNKNOWN means the question has
no answer yet -- an unopened camera, or a model this SDK does
not recognise -- and is not a synonym for "no".
is_focusable
Whether the focus calls below will work on this camera.
diagnosis
A sentence for a person about why focus is unavailable.
Answers on every camera, including one with a motor, where it describes the motor rather than excusing its absence.
focus_range
The travel, as (minimum, maximum) motor steps.
The units are this motor's own. set_focus_fraction is
the way to ask for a position without knowing them.
focus_position
Where the motor is now, in steps.
focus_target
Where the motor was last told to go.
Differs from focus_position while it is still
travelling, which is how you tell "arrived" from "on its way".
focus_fraction
Where the lens is now, as a fraction of its travel.
0.0 at the near end, 1.0 at the far end: the counterpart of
set_focus_fraction, for showing a person where the
focus is without the motor's own units. Read from the motor,
so while the lens is still travelling it reports where it is,
not where it is going.
Optics — methods
set_focus_fraction(fraction)
Focus at a fraction of the travel, 0.0 to 1.0.
The portable way to ask, needing no knowledge of this motor's
units: 0.0 is one end of the range and 1.0 the other. Prefer it
to focus_position unless you have a reason to name a
step.