microspeclib.datatypes.command module¶
-
class
microspeclib.datatypes.command.
CommandNull
(*args, **kwargs)¶ Null loopback request. The hardware will not reply, but the API will still return a null reply object. This is primarily used to flush the line in case of desynchronization.
- Returns
- Return type
-
class
microspeclib.datatypes.command.
CommandGetBridgeLED
(*args, led_num=None, **kwargs)¶ Retrieves the current state of an LED on the Bridge board.
- Parameters
led_num (0) – The index of the LED on the Bridge
- Returns
- Return type
-
class
microspeclib.datatypes.command.
CommandSetBridgeLED
(*args, led_num=None, led_setting=None, **kwargs)¶ Sets the current state of an LED on the Bridge board.
- Parameters
- Returns
- Return type
-
class
microspeclib.datatypes.command.
CommandGetSensorLED
(*args, led_num=None, **kwargs)¶ Retrieves the current state of an LED on the Sensor board.
- Parameters
led_num (0-2) – The index of the LED on the Sensor
- Returns
SensorGetSensorLED
-
class
microspeclib.datatypes.command.
CommandSetSensorLED
(*args, led_num=None, led_setting=None, **kwargs)¶ Sets the current state of an LED on the Bridge board.
- Parameters
- Returns
SensorSetSensorLED
-
class
microspeclib.datatypes.command.
CommandReset
(*args, **kwargs)¶ Resets the hardware and replies when the reset is complete.
- Returns
- Return type
-
class
microspeclib.datatypes.command.
CommandVerify
(*args, **kwargs)¶ Verifies running status of the hardware.
- Returns
- Return type
-
class
microspeclib.datatypes.command.
CommandGetSensorConfig
(*args, **kwargs)¶ Retrieves the current sensor configuration.
-
class
microspeclib.datatypes.command.
CommandSetSensorConfig
(*args, binning=None, gain=None, row_bitmap=None, **kwargs)¶ Sets the current sensor configuration.
- Parameters
binning (0-1) – Whether or not to bin related pixel values
gain (0-255) – Gain
row_bitmap – Which rows to permit sensing on. There are 5, and can all be activated with a binary bitmap of 5 1’s, i.e. 011111 or 0x1F. Any combination is permitted except 0x0
- Returns
-
class
microspeclib.datatypes.command.
CommandGetExposure
(*args, **kwargs)¶ Retrieve the current exposure setting, which may have been set either by
CommandSetExposure
orCommandAutoExposure
.- Returns
-
class
microspeclib.datatypes.command.
CommandSetExposure
(*args, cycles=None, **kwargs)¶ Set the exposure value for the sensor.
- Parameters
cycles (1-65535) – Number of cycles to wait to collect pixel strength.
- Returns
-
class
microspeclib.datatypes.command.
CommandCaptureFrame
(*args, **kwargs)¶ Retrieve one set of captured pixels.
- Returns
-
class
microspeclib.datatypes.command.
CommandAutoExposure
(*args, **kwargs)¶ Tells the sensor to auto-expose.
Does not return the final exposure time. That must be requested separately with a
CommandGetExposure
call.- Returns
-
class
microspeclib.datatypes.command.
CommandGetAutoExposeConfig
(*args, **kwargs)¶ Retrieves the current auto-expose configuration.
-
class
microspeclib.datatypes.command.
CommandSetAutoExposeConfig
(*args, max_tries=None, start_pixel=None, stop_pixel=None, target=None, target_tolerance=None, max_exposure=None, **kwargs)¶ Sets the current auto-expose configuration.
- Parameters
max_tries (1-255) –
Maximum number of exposures to try before giving up.
Firmware defaults to 10 on power-up.
If max_tries is 0, status is ERROR and the AutoExposeConfig is not changed.
start_pixel (7-392 if binning on, 14-784 if binning off) –
Auto-expose ignores pixels below start_pixel when checking if the peak is in the target range.
Firmware defaults to 7 on power-up. Recommended value is the smallest pixel number in the pixel-to-wavelength map.
If start_pixel is outside the allowed range, status is ERROR and the AutoExposeConfig is not changed.
stop_pixel (7-392 if binning on, 14-784 if binning off, must be >= start_pixel) –
Auto-expose ignores pixels above stop_pixel when checking if the peak is in the target range.
Firmware defaults to 392 on power-up. Recommended value is the largest pixel number in the pixel-to-wavelength map.
If stop_pixel < start_pixel, or if stop_pixel is outside the allowed range, status is ERROR and the AutoExposeConfig is not changed.
target (4500-65535) –
Target peak-counts for exposure gain calculation.
Firmware defaults to 46420 counts on power-up.
If target is outside the allowed range, status is ERROR and the AutoExposeConfig is not changed.
target_tolerance (0-65535) –
target +/- target_tolerance is the target peak-counts range. Auto-expose is finished when the peak counts lands in this range.
Firmware defaults to 3277 counts on power-up.
If the combination of target and target_tolerance results in target ranges extending below 4500 counts or above 65535 counts, auto-expose ignores the target_tolerance and clamps the target range at these boundaries.
- Returns
-
microspeclib.datatypes.command.
getCommandByID
(cid)¶
-
microspeclib.datatypes.command.
getCommandByName
(name)¶