microspeclib.simple module¶
-
class
microspeclib.simple.
MicroSpecSimpleInterface
(serial_number=None, device=None, timeout=0.01, retry_timeout=0.001, emulation=False, *args, **kwargs)¶ -
autoExposure
(**kwargs)¶ Tells the sensor to auto-expose.
Does not return the final exposure time. That must be requested separately with a
CommandGetExposure
call.- Returns
-
captureFrame
(**kwargs)¶ Retrieve one set of captured pixels.
- Returns
-
getAutoExposeConfig
(**kwargs)¶ Retrieves the current auto-expose configuration.
-
getBridgeLED
(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
-
getExposure
(**kwargs)¶ Retrieve the current exposure setting, which may have been set either by
CommandSetExposure
orCommandAutoExposure
.- Returns
-
getSensorConfig
(**kwargs)¶ Retrieves the current sensor configuration.
-
getSensorLED
(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
-
null
(**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
-
reset
(**kwargs)¶ Resets the hardware and replies when the reset is complete.
- Returns
- Return type
-
setAutoExposeConfig
(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
-
setBridgeLED
(led_num=None, led_setting=None, **kwargs)¶ Sets the current state of an LED on the Bridge board.
- Parameters
- Returns
- Return type
-
setExposure
(cycles=None, **kwargs)¶ Set the exposure value for the sensor.
- Parameters
cycles (1-65535) – Number of cycles to wait to collect pixel strength.
- Returns
-
setSensorConfig
(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
-
setSensorLED
(led_num=None, led_setting=None, **kwargs)¶ Sets the current state of an LED on the Bridge board.
- Parameters
- Returns
SensorSetSensorLED
-
verify
(**kwargs)¶ Verifies running status of the hardware.
- Returns
- Return type
-