Scanner control¶
- class hs.control.StageController(address, fps=None, velocity=None, distance=None, scanner='auto')¶
A stage controller interface for the buteo to control conveyor movement and lights in conjunction with a hyperspectral camera. It is only possible to have either framerate or velocity set at a time. One will be computed from the other based on the field of view (fov) and oversampling ratio.
- classmethod __new__(*args, **kwargs)¶
- move_direction(velocity)¶
- set_fps(fps)¶
Set framerate in frames/s.
- set_lights_with_timer(time_ms)¶
Toggle lights with a timer. The lights will be on for the duration of time given in ms.
- stop()¶
- toggle_lights(on)¶
Toggle lights on/off
- __module__ = 'builtins'¶
- focal_length¶
Get the lens focal length in mm.
- object_distance¶
Get the lens-to-object distance in mm.
- oversampling¶
Get the oversampling ratio for the buteo’s stage controller.
- Returns:
Oversampling ratio or
Noneif not set.- Return type:
Optional[float]
- pixel_fov¶
Get the along-track pixel FOV at the object plane, in mm.
- pixel_pitch¶
Get the sensor pixel pitch in µm.
- slit_fov¶
Get the cross-track slit FOV at the object plane, in mm.
- slit_width¶
Get the entrance slit width in µm.
- stage_machine¶
Get the stage machine
- Returns:
Stage machine controller
- Return type:
- class hs.control.SimulatedStageController(image, fps=None, velocity=None, distance=None)¶
A stage-controller-compatible simulation backed by an image camera.
Motion and light commands are accepted as no-ops so Python code can swap this type with StageController by duck typing.
- classmethod __new__(*args, **kwargs)¶
- move_direction(velocity)¶
Move the simulated stage continuously in a direction.
- set_fps(fps)¶
Set framerate in frames/s.
- set_lights_with_timer(time_ms)¶
Toggle lights with a timer. The simulated lights will be on for the duration of time given in ms.
- stop()¶
Stop simulated stage motion.
- toggle_lights(on)¶
Toggle simulated lights on/off.
- __module__ = 'builtins'¶
- focal_length¶
Get the lens focal length in mm.
- object_distance¶
Get the lens-to-object distance in mm.
- oversampling¶
Get the oversampling ratio for the simulated stage controller.
- Returns:
Oversampling ratio or
Noneif not set.- Return type:
Optional[float]
- pixel_fov¶
Get the along-track pixel FOV at the object plane, in mm.
- pixel_pitch¶
Get the sensor pixel pitch in µm.
- slit_fov¶
Get the cross-track slit FOV at the object plane, in mm.
- slit_width¶
Get the entrance slit width in µm.
- class hs.control.StageMachine(address)¶
The stage/scanner interface type.
This type can represent different scanning machines behind a single dynamic interface.
- classmethod __new__(*args, **kwargs)¶
- move_direction(velocity)¶
Move the stage continuously in a direction.
- Parameters:
velocity (float) – Velocity in mm/s. Sign determines direction.
- move_distance(dist, velocity)¶
Move the stage a fixed distance at the given velocity.
- set_lights_with_timer(delay_ms)¶
Toggle lights with a timer. The lights will be on for the given duration.
- Parameters:
delay_ms (int) – Duration in milliseconds.
- stop()¶
Stop stage motion.
- toggle_lights(on)¶
Toggle lights on or off.
- Parameters:
on (bool) –
Trueto turn lights on,Falseto turn them off.
- __module__ = 'builtins'¶