OceanDirectLighthouse
3.1.1
OceanDirect Lighthouse Python API
|
Classes | |
class | __LighthouseSingleton |
Public Member Functions | |
def | __init__ (self) |
def | __getattr__ (self, name) |
str | decode_error (self, int errno, str caller) |
tuple[int, int, int] | get_api_version_numbers (self) |
Return OceanDirect api version information. More... | |
str | get_revision_firmware (self, int device_id) |
Reads out the firmware revision from the device's internal memory if that feature is supported. More... | |
str | get_revision_fpga (self, int device_id) |
Reads out the FPGA revision from the device's internal memory if that feature is supported. More... | |
str | get_revision_system (self, int device_id) |
Reads out the System revision from the device's internal memory if that feature is supported. More... | |
None | shutdown (self) |
Closes the connection to OceanDirectAPI. More... | |
None | setMulticastMsgSendRetry (self, int retryCount) |
Set the number of times to send multicast message for dynamic probing. More... | |
None | setMulticastMsgResponseReadDelay (self, int delayMs) |
Set the delay between reading multicast response. More... | |
None | setMulticastMsgResponseReadRetry (self, int retryCount) |
Set the number of times to read multicast message response. More... | |
int | probe_all_devices (self) |
Finds all available Ocean devices by scanning on USB for devices with Ocean drivers, finding devices that respond to UDP multicast, and also returning IDs for any TCP-enabled devices that have been manually specified using addTCPDeviceLocation(). More... | |
int | probe_usb_devices (self) |
Finds all available Ocean devices by scanning on USB for devices with Ocean drivers. More... | |
int | probe_network_devices (self) |
Finds all available Ocean devices by scanning the network for devices with Ocean drivers. More... | |
int | add_network_device (self, str ipAddress, str deviceType) |
Manually create an instance of the network attached device and then open it using the openDevice() function. More... | |
int | get_number_devices (self) |
Returns the number of devices available. More... | |
list[int] | get_network_device_ids (self) |
Return a list of network device ids from devices that were probe. More... | |
list[int] | get_device_ids (self) |
Return a list of device ids from devices that were both probe or manually added. More... | |
str | get_serial_number (self, int device_id) |
Read the device serial number. More... | |
int | get_device_type (self, int device_id) |
Read the device type. More... | |
str | get_model (self, int device_id) |
Read the correct spectrometer model name assigned. More... | |
None | open_device (self, int device_id) |
Attach to a device discovered by probe_devices or get_device_ids. More... | |
None | close_device (self, int device_id) |
Detaches the device to free it up for other users. More... | |
None | set_scans_to_average (self, int device_id, int newScanToAverage) |
Sets the number of spectra to average. More... | |
int | get_scans_to_average (self, int device_id) |
Gets the number of spectra to average. More... | |
None | set_boxcar_width (self, int device_id, int newBoxcarWidth) |
Sets the boxcar width to average the spectral data. More... | |
int | get_boxcar_width (self, int device_id) |
Read the current boxcar width setting. More... | |
int | get_maximum_intensity (self, int device_id) |
Returns the maximum pixel value the detector can read. More... | |
int | get_spectrum_length (self, int device_id) |
Return a formatted spectrum length. More... | |
list[float] | get_spectrum (self, int device_id) |
Return a formatted spectrum. More... | |
SpectrumWithMetadata | get_spectrum_with_metadata (self, int device_id) |
Returns spectra with metadata information. More... | |
list[float] | get_wavelengths (self, int device_id) |
This computes the wavelengths for the spectrometer and fills in the provided array (up to the given length) with those values. More... | |
int | get_minimum_integration_time (self, int device_id) |
Returns the minimum allowable integration time on the device. More... | |
int | get_maximum_integration_time (self, int device_id) |
Returns the maximum allowable integration time on the device. More... | |
int | get_minimum_averaging_integration_time (self, int device_id) |
This function returns the smallest integration time setting, in microseconds, that is valid for the spectrometer. More... | |
None | set_integration_time (self, int device_id, int int_time) |
Sets the integration time on the device. More... | |
int | get_integration_time (self, int device_id) |
Returns the current integration time on the device. More... | |
int | get_integration_time_increment (self, int device_id) |
Returns the integration time increment on the device. More... | |
None | set_trigger_mode (self, int device_id, int mode) |
Set the device trigger mode. More... | |
None | get_trigger_mode (self, int device_id) |
Returns the current trigger mode from the device. More... | |
int | get_active_pixel_count (self, int device_id) |
This returns the number of pixels that are active. More... | |
list[int] | get_active_pixel_indices (self, int device_id) |
Read the active pixel range from the sensor pixel array. More... | |
int | get_electric_dark_pixel_count (self, int device_id) |
This returns the number of pixels that are electrically active but optically masked (a.k.a. More... | |
list[int] | get_electric_dark_pixel_indices (self, int device_id) |
Read the optical dark pixel range from the sensor pixel array. More... | |
int | get_transition_pixel_count (self, int device_id) |
This returns the number of pixels that are transition or bevel. More... | |
list[int] | get_transition_pixel_indices (self, int device_id) |
Read the transition pixel range from the sensor pixel array. More... | |
list[int] | get_bad_pixel_indices (self, int device_id) |
Read bad pixel indices from the sensor pixel array. More... | |
None | details (self, int device_id) |
Prints the defined set of details about the device. More... | |
None | set_acquisition_delay (self, int device_id, int delayMicrosecond) |
Set the acquisition delay in microseconds. More... | |
int | get_acquisition_delay (self, int device_id) |
Get the acquisition delay in microseconds. More... | |
int | get_acquisition_delay_increment (self, int device_id) |
Get the allowed step size for the acquisition delay in microseconds. More... | |
int | get_acquisition_delay_maximum (self, int device_id) |
Get the maximum allowed acquisition delay in microseconds. More... | |
int | get_acquisition_delay_minimum (self, int device_id) |
Get the minimum allowed acquisition delay in microseconds. More... | |
None | set_stored_dark_spectrum (self, int device_id, list[float] darkSpectrum) |
Store a dark spectrum for use in subsequent corrections i.e. More... | |
list[float] | get_stored_dark_spectrum (self, int device_id) |
Retrieve a previously stored dark spectrum for use in subsequent corrections i.e. More... | |
list[float] | get_dark_corrected_spectrum1 (self, int device_id) |
Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum. More... | |
list[float] | dark_correct_spectrum1 (self, int device_id, list[float] illuminatedSpectrum) |
Dark correct a previously acquired illuminated spectrum and using a stored dark spectrum. More... | |
list[float] | get_dark_corrected_spectrum2 (self, int device_id, list[float] darkSpectrum) |
Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum. More... | |
list[float] | dark_correct_spectrum2 (self, int device_id, list[float] darkSpectrum, list[float] illuminatedSpectrum) |
Dark correct a previously acquired illuminated spectrum and using a previously acquired dark spectrum. More... | |
list[float] | get_nonlinearity_corrected_spectrum1 (self, int device_id) |
Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction followed by a nonlinearity correction then return the nonlinearity corrected spectrum. More... | |
list[float] | nonlinearity_correct_spectrum1 (self, int device_id, list[float] illuminatedSpectrum) |
Nonlinearity correct a previously acquired illuminated spectrum using a stored dark spectrum. More... | |
list[float] | get_nonlinearity_corrected_spectrum2 (self, int device_id, list[float] darkSpectrum) |
Acquire a spectrum and use the supplied dark spectrum to perform a dark correction followed by the nonlinearity correction then return the nonlinearity corrected spectrum. More... | |
list[float] | nonlinearity_correct_spectrum2 (self, int device_id, list[float] darkSpectrum, list[float] illuminatedSpectrum) |
Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum. More... | |
list[float] | boxcar_correct_spectrum (self, int device_id, list[float] illuminatedSpectrum, int boxcarWidth) |
Apply a boxcar correction on the given illuminated spectrum. More... | |
None | set_electric_dark_correction_state (self, int device_id, bool isEnabled) |
Enable or disable an electric dark correction. More... | |
bool | get_electric_dark_correction_state (self, int device_id) |
Return electric dark correction usage. More... | |
None | set_nonlinearity_correction_state (self, int device_id, bool isEnabled) |
Enable or disable nonlinearity correction. More... | |
bool | get_nonlinearity_correction_state (self, int device_id) |
Return nonlinearity correction usage. More... | |
None | set_lamp_state (self, int device_id, bool enable) |
Enable or disable the lamp. More... | |
bool | get_lamp_state (self, int device_id) |
Return the lamp state. More... | |
None | set_shutter_state (self, int device_id, bool shutterState) |
This function will open or close the shutter on the spectrometer. More... | |
None | get_shutter_state (self, int device_id) |
This function returns the shutter state of the spectrometer. More... | |
list[float] | get_wavelength_coefficients (self, int device_id) |
Read the wavelength coefficients from the device. More... | |
list[float] | get_nonlinearity_coefficients (self, int device_id) |
Read the nonlinearity coefficients stored in the device. More... | |
None | set_tec_temperature_setpoint (self, int device_id, float temp_C) |
Apply the setpoint temperature (Celsius) in the thermo-electric cooler. More... | |
float | get_tec_temperature_setpoint (self, int device_id) |
Read the set point temperature of the thermo-electric cooler. More... | |
float | get_tec_temperature (self, int device_id) |
Returns the temperature reading (celsius) of a detector thermistor. More... | |
bool | get_tec_stable (self, int device_id) |
Returns the state of thermo-electric cooler temperature on whether it reached the stable temperature or not. More... | |
None | set_single_strobe_state (self, int device_id, bool enable) |
Set the enable status of the single strobe signal. More... | |
bool | get_single_strobe_state (self, int device_id) |
Get the enable status of the single strobe signal. More... | |
None | set_single_strobe_delay (self, int device_id, int delayMicrosecond) |
Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More... | |
int | get_single_strobe_delay (self, int device_id) |
Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More... | |
None | set_single_strobe_width (self, int device_id, int widthMicrosecond) |
Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More... | |
int | get_single_strobe_width (self, int device_id) |
Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More... | |
int | get_single_strobe_delay_minimum (self, int device_id) |
Get the minimum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More... | |
int | get_single_strobe_delay_maximum (self, int device_id) |
Get the maximum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More... | |
int | get_single_strobe_delay_increment (self, int device_id) |
Gets the single strobe delay increment in microseconds. More... | |
int | get_single_strobe_width_minimum (self, int device_id) |
Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More... | |
int | get_single_strobe_width_maximum (self, int device_id) |
Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More... | |
int | get_single_strobe_width_increment (self, int device_id) |
Get the single strobe width increment. More... | |
None | set_continuous_strobe_period (self, int device_id, int period) |
Sets the continuous strobe period in microseconds. More... | |
int | get_continuous_strobe_period (self, int device_id) |
Get the continuous strobe period in microseconds. More... | |
None | set_continuous_strobe_state (self, int device_id, bool enable) |
Sets the continuous strobe enable state on the device. More... | |
bool | get_continuous_strobe_state (self, int device_id) |
Gets the continuous strobe state (enabled or disabled) of the device. More... | |
int | get_continuous_strobe_period_minimum (self, int device_id) |
Gets the minimum continuous strobe period of the device in microseconds. More... | |
int | get_continuous_strobe_period_maximum (self, int device_id) |
Gets the maximum continuous strobe period of the device in microseconds. More... | |
int | get_continuous_strobe_period_increment (self, int device_id) |
This function gets the current size of the strobe period increment of the device in microseconds. More... | |
None | set_led_state (self, int device_id, bool isEnabled) |
Enable or disable device LED. More... | |
bool | get_led_state (self, int device_id) |
Get device LED state. More... | |
int | get_device_original_vid (self, int device_id) |
Get the original vendor id (VID) of the device. More... | |
int | get_device_original_pid (self, int device_id) |
Get the original product id (PID) of the device. More... | |
int | get_device_vid (self, int device_id) |
Get the current vendor id (VID) of the device. More... | |
int | get_device_pid (self, int device_id) |
Get the current product id (PID) of the device. More... | |
str | get_device_original_manufacturer_string (self, int device_id) |
Get the original manufacturer string of the device. More... | |
str | get_device_original_model_string (self, int device_id) |
Get the original model string of the device. More... | |
str | get_device_manufacturer_string (self, int device_id) |
Get the current manufacturer string of the device. More... | |
str | get_device_model_string (self, int device_id) |
Get the current model string of the device. More... | |
str | get_device_alias (self, int device_id) |
Read the device alias from the device. More... | |
None | reset_device (self, int device_id) |
Restarts the device. More... | |
str | get_user_string (self, int device_id) |
Read the user string from the device. More... | |
None | set_user_string (self, int device_id, str userString) |
Set a new user string to the device. More... | |
int | get_gpio_pin_count (self, int device_id) |
Get GPIO pin count. More... | |
None | set_gpio_output_state (self, int device_id, int direction, int bitmask) |
Sets the GPIO bit direction to either output or input. More... | |
int | get_gpio_output_state (self, int device_id) |
Get all GPIO bit direction. More... | |
None | set_gpio_value (self, int device_id, int value, int bitmask) |
Sets the GPIO bit value to either high or low. More... | |
int | get_gpio_value (self, int device_id) |
Get all GPIO bit values. More... | |
int | get_baud_rate (self, int device_id) |
Read the device RS-232 baud rate. More... | |
None | set_baud_rate (self, int device_id, int baudRate) |
Set a new baud rate for the RS-232 port. More... | |
int | get_autonull_maximum_adc_count (self, int device_id) |
Read the maximum ADC counts. More... | |
int | get_autonull_baseline_level (self, int device_id) |
Read the baseline level. More... | |
int | get_autonull_saturation_level (self, int device_id) |
Read the saturation level. More... | |
int | get_autonull_fpga_digital_gain (self, int device_id) |
Read the fpga digital gain. More... | |
int | get_autonull_fpga_digital_offset (self, int device_id) |
Read the fpga digital offset. More... | |
bool | get_ip_address_assigned_mode (self, int device_id) |
Read the IP address mode from the OBP2 device. More... | |
None | set_ip_address_assigned_mode (self, int device_id, bool useDHCP) |
Set the IP address mode to the OBP2 device. More... | |
bool | get_ethernet_addon_available (self, int device_id) |
Return True or False on whether an ethernet add-on package is available in the OBP2 enabled device. More... | |
list[int] | get_ethernet_mac_address (self, int device_id) |
Read the ethernet 6-byte mac address from an OBP2 enabled device. More... | |
tuple[bool, LighthouseNetworkConfiguration] | get_network_configuration (self, int device_id) |
Read the network configuration parameters from an OBP2 enabled device. More... | |
None | set_manual_network_configuration (self, int device_id, LighthouseNetworkConfiguration networkConfig) |
Write the network configuration parameters (static ip address) on OBP2 enabled device. More... | |
LighthouseNetworkConfiguration | get_manual_network_configuration (self, int device_id) |
Read the network configuration parameters (static ip address) from an OBP2 enabled device. More... | |
None | save_settings_to_flash (self, int device_id) |
Save settings to flash. More... | |
Public Attributes | |
spectrum_length_map | |
Static Public Attributes | |
instance | |
Definition at line 12 of file LighthouseAPI.py.
def Python.oceandirect.LighthouseAPI.LighthouseAPI.__init__ | ( | self | ) |
Loads and initializes the OceanDirect dll and initializes internal variables.
Definition at line 37 of file LighthouseAPI.py.
def Python.oceandirect.LighthouseAPI.LighthouseAPI.__getattr__ | ( | self, | |
name | |||
) |
Definition at line 46 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.add_network_device | ( | self, | |
str | ipAddress, | ||
str | deviceType | ||
) |
Manually create an instance of the network attached device and then open it using the openDevice() function.
It is the responsiblitiy of the user to ensure that the device exist and configured properly. Note that this should only be done by one thread at a time.
ipAddress | The ip address as string (ex: "10.20.30.100" ) of the device to be opened. |
deviceType | The device type could be OceanFX or OceanHDX. This is case sensitive. |
Definition at line 244 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.boxcar_correct_spectrum | ( | self, | |
int | device_id, | ||
list[float] | illuminatedSpectrum, | ||
int | boxcarWidth | ||
) |
Apply a boxcar correction on the given illuminated spectrum.
device_id | The device id. |
illuminatedSpectrum | The spectrum that will be boxcar corrected. |
boxcarWidth | The boxcar width. |
Definition at line 1231 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.close_device | ( | self, | |
int | device_id | ||
) |
Detaches the device to free it up for other users.
The device_id becomes invalid after closing the device. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
device_id | The id of the device to be closed. |
Definition at line 418 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.dark_correct_spectrum1 | ( | self, | |
int | device_id, | ||
list[float] | illuminatedSpectrum | ||
) |
Dark correct a previously acquired illuminated spectrum and using a stored dark spectrum.
device_id | The device id. |
illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
Definition at line 1030 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.dark_correct_spectrum2 | ( | self, | |
int | device_id, | ||
list[float] | darkSpectrum, | ||
list[float] | illuminatedSpectrum | ||
) |
Dark correct a previously acquired illuminated spectrum and using a previously acquired dark spectrum.
device_id | The device id. |
darkSpectrum | The buffer that contains the dark spectrum to be used for the dark correction. |
illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
Definition at line 1082 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.decode_error | ( | self, | |
int | errno, | ||
str | caller | ||
) |
OceanDirectAPI returns an error code if something goes wrong. This function will decode that error to a readable string. @param errno: The error code generated by OceanDirect api. :type errno: int @param caller: The caller which produces the error code. Use for debugging purposes only. :type caller: str
Definition at line 49 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.details | ( | self, | |
int | device_id | ||
) |
Prints the defined set of details about the device.
device_id | The device id. |
Definition at line 868 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_acquisition_delay | ( | self, | |
int | device_id | ||
) |
Get the acquisition delay in microseconds.
This may also be referred to as the trigger delay. In any event, it is the time between some event (such as a request for data, or an external trigger pulse) and when data acquisition begins. Note that not all devices support reading this value back. In these cases, the returned value will be the last value sent to odapi_adv_set_acquisition_delay_microseconds(). If no value has been set and the value cannot be read back, this function will indicate an error.
device_id | The device id. |
Definition at line 897 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_acquisition_delay_increment | ( | self, | |
int | device_id | ||
) |
Get the allowed step size for the acquisition delay in microseconds.
device_id | The device id. |
Definition at line 920 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_acquisition_delay_maximum | ( | self, | |
int | device_id | ||
) |
Get the maximum allowed acquisition delay in microseconds.
device_id | The device id. |
Definition at line 936 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_acquisition_delay_minimum | ( | self, | |
int | device_id | ||
) |
Get the minimum allowed acquisition delay in microseconds.
device_id | The device id. |
Definition at line 952 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_active_pixel_count | ( | self, | |
int | device_id | ||
) |
This returns the number of pixels that are active.
device_id | The device id. |
Definition at line 736 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_active_pixel_indices | ( | self, | |
int | device_id | ||
) |
Read the active pixel range from the sensor pixel array.
This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.
device_id | The device id. |
Definition at line 752 of file LighthouseAPI.py.
tuple[int, int, int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_api_version_numbers | ( | self | ) |
Return OceanDirect api version information.
Definition at line 64 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_autonull_baseline_level | ( | self, | |
int | device_id | ||
) |
Read the baseline level.
device_id | The device id. |
Definition at line 2204 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_autonull_fpga_digital_gain | ( | self, | |
int | device_id | ||
) |
Read the fpga digital gain.
device_id | The device id. |
Definition at line 2236 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_autonull_fpga_digital_offset | ( | self, | |
int | device_id | ||
) |
Read the fpga digital offset.
device_id | The device id. |
Definition at line 2252 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_autonull_maximum_adc_count | ( | self, | |
int | device_id | ||
) |
Read the maximum ADC counts.
device_id | The device id. |
Definition at line 2188 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_autonull_saturation_level | ( | self, | |
int | device_id | ||
) |
Read the saturation level.
Most devices returns 65535.
device_id | The device id. |
Definition at line 2220 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_bad_pixel_indices | ( | self, | |
int | device_id | ||
) |
Read bad pixel indices from the sensor pixel array.
This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.
device_id | The device id. |
Definition at line 850 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_baud_rate | ( | self, | |
int | device_id | ||
) |
Read the device RS-232 baud rate.
device_id | The device id. |
Definition at line 2149 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_boxcar_width | ( | self, | |
int | device_id | ||
) |
Read the current boxcar width setting.
device_id | The device id. |
Definition at line 482 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_continuous_strobe_period | ( | self, | |
int | device_id | ||
) |
Get the continuous strobe period in microseconds.
device_id | The device id. |
Definition at line 1721 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_continuous_strobe_period_increment | ( | self, | |
int | device_id | ||
) |
This function gets the current size of the strobe period increment of the device in microseconds.
The increment is dependent on the strobe period. Small strobe periods i.e. less than about 1ms will have a small increment, typically 1 microsecond. Larger strobe periods will have larger increments, typically 1ms.
device_id | The device id. |
Definition at line 1807 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_continuous_strobe_period_maximum | ( | self, | |
int | device_id | ||
) |
Gets the maximum continuous strobe period of the device in microseconds.
device_id | The device id. |
Definition at line 1791 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_continuous_strobe_period_minimum | ( | self, | |
int | device_id | ||
) |
Gets the minimum continuous strobe period of the device in microseconds.
device_id | The device id. |
Definition at line 1775 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_continuous_strobe_state | ( | self, | |
int | device_id | ||
) |
Gets the continuous strobe state (enabled or disabled) of the device.
device_id | The device id. |
Definition at line 1758 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_dark_corrected_spectrum1 | ( | self, | |
int | device_id | ||
) |
Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum.
device_id | The device id. |
Definition at line 1012 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_dark_corrected_spectrum2 | ( | self, | |
int | device_id, | ||
list[float] | darkSpectrum | ||
) |
Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum.
device_id | The device id. |
Definition at line 1059 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_alias | ( | self, | |
int | device_id | ||
) |
Read the device alias from the device.
If this field in the device is not yet populated then a non-zero(6) code will be returned.
device_id | The device id. |
Definition at line 1994 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_ids | ( | self | ) |
Return a list of device ids from devices that were both probe or manually added.
Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
Definition at line 309 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_manufacturer_string | ( | self, | |
int | device_id | ||
) |
Get the current manufacturer string of the device.
device_id | The device id. |
Definition at line 1959 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_model_string | ( | self, | |
int | device_id | ||
) |
Get the current model string of the device.
device_id | The device id. |
Definition at line 1976 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_original_manufacturer_string | ( | self, | |
int | device_id | ||
) |
Get the original manufacturer string of the device.
device_id | The device id. |
Definition at line 1925 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_original_model_string | ( | self, | |
int | device_id | ||
) |
Get the original model string of the device.
device_id | The device id. |
Definition at line 1942 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_original_pid | ( | self, | |
int | device_id | ||
) |
Get the original product id (PID) of the device.
device_id | The device id. |
Definition at line 1877 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_original_vid | ( | self, | |
int | device_id | ||
) |
Get the original vendor id (VID) of the device.
device_id | The device id. |
Definition at line 1861 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_pid | ( | self, | |
int | device_id | ||
) |
Get the current product id (PID) of the device.
device_id | The device id. |
Definition at line 1909 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_type | ( | self, | |
int | device_id | ||
) |
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_device_vid | ( | self, | |
int | device_id | ||
) |
Get the current vendor id (VID) of the device.
device_id | The device id. |
Definition at line 1893 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_electric_dark_correction_state | ( | self, | |
int | device_id | ||
) |
Return electric dark correction usage.
device_id | The device id. |
Definition at line 1277 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_electric_dark_pixel_count | ( | self, | |
int | device_id | ||
) |
This returns the number of pixels that are electrically active but optically masked (a.k.a.
electric dark pixels). Note that not all detectors have optically masked pixels; in that case, this function will return zero.
device_id | The device id. |
Definition at line 772 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_electric_dark_pixel_indices | ( | self, | |
int | device_id | ||
) |
Read the optical dark pixel range from the sensor pixel array.
This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.
device_id | The device id. |
Definition at line 790 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_ethernet_addon_available | ( | self, | |
int | device_id | ||
) |
Return True or False on whether an ethernet add-on package is available in the OBP2 enabled device.
device_id | The device id. |
Definition at line 2306 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_ethernet_mac_address | ( | self, | |
int | device_id | ||
) |
Read the ethernet 6-byte mac address from an OBP2 enabled device.
device_id | The device id. |
Definition at line 2322 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_gpio_output_state | ( | self, | |
int | device_id | ||
) |
Get all GPIO bit direction.
device_id | The device id. |
Definition at line 2097 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_gpio_pin_count | ( | self, | |
int | device_id | ||
) |
Get GPIO pin count.
device_id | The device id. |
Definition at line 2065 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_gpio_value | ( | self, | |
int | device_id | ||
) |
Get all GPIO bit values.
device_id | The device id. |
Definition at line 2130 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_integration_time | ( | self, | |
int | device_id | ||
) |
Returns the current integration time on the device.
device_id | The device id. |
Definition at line 666 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_integration_time_increment | ( | self, | |
int | device_id | ||
) |
Returns the integration time increment on the device.
device_id | The device id. |
Definition at line 686 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_ip_address_assigned_mode | ( | self, | |
int | device_id | ||
) |
Read the IP address mode from the OBP2 device.
device_id | The device id. |
Definition at line 2268 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_lamp_state | ( | self, | |
int | device_id | ||
) |
Return the lamp state.
device_id | The device id. |
Definition at line 1341 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_led_state | ( | self, | |
int | device_id | ||
) |
Get device LED state.
If the device don't have an LED then an exception will be thrown.
device_id | The device id. |
Definition at line 1843 of file LighthouseAPI.py.
LighthouseNetworkConfiguration Python.oceandirect.LighthouseAPI.LighthouseAPI.get_manual_network_configuration | ( | self, | |
int | device_id | ||
) |
Read the network configuration parameters (static ip address) from an OBP2 enabled device.
This function will return a LighthouseNetworkConfiguration that contains the ip address, subnet mask, default gateway, and dns server address.
device_id | The device id. |
Definition at line 2387 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_maximum_integration_time | ( | self, | |
int | device_id | ||
) |
Returns the maximum allowable integration time on the device.
device_id | The device id. |
Definition at line 608 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_maximum_intensity | ( | self, | |
int | device_id | ||
) |
Returns the maximum pixel value the detector can read.
device_id | The device id. |
Definition at line 499 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_minimum_averaging_integration_time | ( | self, | |
int | device_id | ||
) |
This function returns the smallest integration time setting, in microseconds, that is valid for the spectrometer.
NOTE: some devices that make use of onboard functionality to perform averaging have a different, larger, minimum integration time for acquisition when averaging is enabled. Refer to the documentation for your spectrometer to see if this is the case. The minimum integration time when averaging is enabled can be determined using odapi_get_minimum_averaging_integration_time_micros.
device_id | The device id. |
Definition at line 628 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_minimum_integration_time | ( | self, | |
int | device_id | ||
) |
Returns the minimum allowable integration time on the device.
device_id | The device id. |
Definition at line 592 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_model | ( | self, | |
int | device_id | ||
) |
Read the correct spectrometer model name assigned.
device_id | The device id. |
Definition at line 362 of file LighthouseAPI.py.
tuple[bool, LighthouseNetworkConfiguration] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_network_configuration | ( | self, | |
int | device_id | ||
) |
Read the network configuration parameters from an OBP2 enabled device.
This function will return a tuple of 2 objects in this order: address mode - True if it's using DHCP IP address otherwise its False. network configuration - A LighthouseNetworkConfiguration object containing the ip address, subnet mask, default gateway, and dns server.
device_id | The device id. |
Definition at line 2345 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_network_device_ids | ( | self | ) |
Return a list of network device ids from devices that were probe.
Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
Definition at line 290 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_nonlinearity_coefficients | ( | self, | |
int | device_id | ||
) |
Read the nonlinearity coefficients stored in the device.
This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.
device_id | The device id. |
Definition at line 1408 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_nonlinearity_corrected_spectrum1 | ( | self, | |
int | device_id | ||
) |
Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction followed by a nonlinearity correction then return the nonlinearity corrected spectrum.
device_id | The device id. |
Definition at line 1117 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_nonlinearity_corrected_spectrum2 | ( | self, | |
int | device_id, | ||
list[float] | darkSpectrum | ||
) |
Acquire a spectrum and use the supplied dark spectrum to perform a dark correction followed by the nonlinearity correction then return the nonlinearity corrected spectrum.
device_id | The device id. |
Definition at line 1166 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_nonlinearity_correction_state | ( | self, | |
int | device_id | ||
) |
Return nonlinearity correction usage.
device_id | The device id. |
Definition at line 1309 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_number_devices | ( | self | ) |
Returns the number of devices available.
Note that this should only be done by one thread at a time.
Definition at line 275 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_revision_firmware | ( | self, | |
int | device_id | ||
) |
Reads out the firmware revision from the device's internal memory if that feature is supported.
device_id | The device id. |
Definition at line 78 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_revision_fpga | ( | self, | |
int | device_id | ||
) |
Reads out the FPGA revision from the device's internal memory if that feature is supported.
device_id | The device id. |
Definition at line 98 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_revision_system | ( | self, | |
int | device_id | ||
) |
Reads out the System revision from the device's internal memory if that feature is supported.
device_id | The device id. |
Definition at line 117 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_scans_to_average | ( | self, | |
int | device_id | ||
) |
Gets the number of spectra to average.
device_id | The device id. |
Definition at line 450 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_serial_number | ( | self, | |
int | device_id | ||
) |
Read the device serial number.
device_id | The device id. |
Definition at line 331 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.get_shutter_state | ( | self, | |
int | device_id | ||
) |
This function returns the shutter state of the spectrometer.
device_id | The device id. |
Definition at line 1373 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_delay | ( | self, | |
int | device_id | ||
) |
Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.
device_id | The device id. |
Definition at line 1552 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_delay_increment | ( | self, | |
int | device_id | ||
) |
Gets the single strobe delay increment in microseconds.
device_id | The device id. |
Definition at line 1639 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_delay_maximum | ( | self, | |
int | device_id | ||
) |
Get the maximum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.
device_id | The device id. |
Definition at line 1622 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_delay_minimum | ( | self, | |
int | device_id | ||
) |
Get the minimum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.
device_id | The device id. |
Definition at line 1605 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_state | ( | self, | |
int | device_id | ||
) |
Get the enable status of the single strobe signal.
Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.
device_id | The device id. |
Definition at line 1515 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_width | ( | self, | |
int | device_id | ||
) |
Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.
device_id | The device id. |
Definition at line 1587 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_width_increment | ( | self, | |
int | device_id | ||
) |
Get the single strobe width increment.
device_id | The device id. |
Definition at line 1689 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_width_maximum | ( | self, | |
int | device_id | ||
) |
Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.
device_id | The device id. |
Definition at line 1672 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_single_strobe_width_minimum | ( | self, | |
int | device_id | ||
) |
Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.
device_id | The device id. |
Definition at line 1655 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_spectrum | ( | self, | |
int | device_id | ||
) |
Return a formatted spectrum.
device_id | The device id. |
Definition at line 532 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_spectrum_length | ( | self, | |
int | device_id | ||
) |
Return a formatted spectrum length.
device_id | The device id. |
Definition at line 516 of file LighthouseAPI.py.
SpectrumWithMetadata Python.oceandirect.LighthouseAPI.LighthouseAPI.get_spectrum_with_metadata | ( | self, | |
int | device_id | ||
) |
Returns spectra with metadata information.
For older devices such as FX/HDX, read a maximum of 15 spectra from the data buffer. This function requires that both back to back scans and data buffer be enabled. See "set_data_buffer_enable()" and "set_number_of_backtoback_scans()". For newer devices such as Ocean SR2, you can call this function right away. See device manual if this command is supported.
device_id | The device id. |
Definition at line 553 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_stored_dark_spectrum | ( | self, | |
int | device_id | ||
) |
Retrieve a previously stored dark spectrum for use in subsequent corrections i.e.
dark correction and nonlinearity correction.
device_id | The device id. |
Definition at line 994 of file LighthouseAPI.py.
bool Python.oceandirect.LighthouseAPI.LighthouseAPI.get_tec_stable | ( | self, | |
int | device_id | ||
) |
Returns the state of thermo-electric cooler temperature on whether it reached the stable temperature or not.
If this function is not supported by the device then an exception will be thrown.
device_id | The device id. |
Definition at line 1479 of file LighthouseAPI.py.
float Python.oceandirect.LighthouseAPI.LighthouseAPI.get_tec_temperature | ( | self, | |
int | device_id | ||
) |
Returns the temperature reading (celsius) of a detector thermistor.
This is equivalent to calling get_temperature(index) where the "index" is a detector thermistor index. If this function is not supported by the device then an exception will be thrown.
device_id | The device id. |
Definition at line 1461 of file LighthouseAPI.py.
float Python.oceandirect.LighthouseAPI.LighthouseAPI.get_tec_temperature_setpoint | ( | self, | |
int | device_id | ||
) |
Read the set point temperature of the thermo-electric cooler.
If this function is not supported by the device then an exception will be thrown.
device_id | The device id. |
Definition at line 1443 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.get_transition_pixel_count | ( | self, | |
int | device_id | ||
) |
This returns the number of pixels that are transition or bevel.
device_id | The device id. |
Definition at line 812 of file LighthouseAPI.py.
list[int] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_transition_pixel_indices | ( | self, | |
int | device_id | ||
) |
Read the transition pixel range from the sensor pixel array.
This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.
device_id | The device id. |
Definition at line 828 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.get_trigger_mode | ( | self, | |
int | device_id | ||
) |
Returns the current trigger mode from the device.
If this function is not supported by the device then an exception will be thrown.
device_id | The device id. |
Definition at line 717 of file LighthouseAPI.py.
str Python.oceandirect.LighthouseAPI.LighthouseAPI.get_user_string | ( | self, | |
int | device_id | ||
) |
Read the user string from the device.
If this field in the device is not yet populated then a non-zero(6) code will be returned.
device_id | The device id. |
Definition at line 2024 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_wavelength_coefficients | ( | self, | |
int | device_id | ||
) |
Read the wavelength coefficients from the device.
This command is being used in OBP-2.0 enabled devices. If the device don't support this command then a non-zero error code will be returned.
device_id | The device id. |
Definition at line 1390 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.get_wavelengths | ( | self, | |
int | device_id | ||
) |
This computes the wavelengths for the spectrometer and fills in the provided array (up to the given length) with those values.
device_id | The device id. |
Definition at line 574 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.nonlinearity_correct_spectrum1 | ( | self, | |
int | device_id, | ||
list[float] | illuminatedSpectrum | ||
) |
Nonlinearity correct a previously acquired illuminated spectrum using a stored dark spectrum.
This function performs a dark correction using a previously stored dark spectrum prior to performing the nonlinearity correction.
device_id | The device id. |
illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
Definition at line 1136 of file LighthouseAPI.py.
list[float] Python.oceandirect.LighthouseAPI.LighthouseAPI.nonlinearity_correct_spectrum2 | ( | self, | |
int | device_id, | ||
list[float] | darkSpectrum, | ||
list[float] | illuminatedSpectrum | ||
) |
Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum.
device_id | The device id. |
darkSpectrum | The buffer that contains the dark spectrum to be used prior to the nonlinearity correction. |
illuminatedSpectrum | The buffer that contains the illuminated spectrum to be corrected. |
Definition at line 1195 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.open_device | ( | self, | |
int | device_id | ||
) |
Attach to a device discovered by probe_devices or get_device_ids.
After the device is closed the device_id becomes invalid. You need to call either find_devices()/find_usb_devices()/add_network_device() and get_device_ids() in order to have a valid id before reopening the device again. For a network connected device this function may return an error code if the device is not yet ready to accept incoming connection or the device is unreachable. Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
device_id | The device id. |
Definition at line 380 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.probe_all_devices | ( | self | ) |
Finds all available Ocean devices by scanning on USB for devices with Ocean drivers, finding devices that respond to UDP multicast, and also returning IDs for any TCP-enabled devices that have been manually specified using addTCPDeviceLocation().
Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
Definition at line 192 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.probe_network_devices | ( | self | ) |
Finds all available Ocean devices by scanning the network for devices with Ocean drivers.
Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
Definition at line 227 of file LighthouseAPI.py.
int Python.oceandirect.LighthouseAPI.LighthouseAPI.probe_usb_devices | ( | self | ) |
Finds all available Ocean devices by scanning on USB for devices with Ocean drivers.
Note that this should only be done by one thread at a time. For multithreaded application this function must be synchronized.
Definition at line 210 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.reset_device | ( | self, | |
int | device_id | ||
) |
Restarts the device.
device_id | The device id. |
Definition at line 2011 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.save_settings_to_flash | ( | self, | |
int | device_id | ||
) |
Save settings to flash.
Not all devices supported this command.
device_id | The device id. |
Definition at line 2407 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_acquisition_delay | ( | self, | |
int | device_id, | ||
int | delayMicrosecond | ||
) |
Set the acquisition delay in microseconds.
This may also be referred to as the trigger delay. In any event, it is the time between some event (such as a request for data, or an external trigger pulse) and when data acquisition begins.
device_id | The device id. |
delayMicrosecond | The new delay to use in microseconds. |
Definition at line 880 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_baud_rate | ( | self, | |
int | device_id, | ||
int | baudRate | ||
) |
Set a new baud rate for the RS-232 port.
device_id | The device id. |
baudRate | The baud rate value. |
Definition at line 2166 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_boxcar_width | ( | self, | |
int | device_id, | ||
int | newBoxcarWidth | ||
) |
Sets the boxcar width to average the spectral data.
@get_boxcar_width()
device_id | The device id. |
newBoxcarWidth | The boxcar width. |
Definition at line 467 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_continuous_strobe_period | ( | self, | |
int | device_id, | ||
int | period | ||
) |
Sets the continuous strobe period in microseconds.
device_id | The device id. |
period | The new period of the continuous strobe measured in microseconds |
Definition at line 1706 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_continuous_strobe_state | ( | self, | |
int | device_id, | ||
bool | enable | ||
) |
Sets the continuous strobe enable state on the device.
device_id | The device id. |
enable | A boolean used for denoting the desired state (on/off) of the continuous strobe generator. If the value of enable is nonzero, then the continuous strobe will operate. If the value of enable is zero, then the continuous strobe will stop. Note that on some devices the continuous strobe enable is tied to other enables (such as lamp enable or single strobe enable) which may cause side effects. |
Definition at line 1738 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_electric_dark_correction_state | ( | self, | |
int | device_id, | ||
bool | isEnabled | ||
) |
Enable or disable an electric dark correction.
device_id | The device id. |
isEnabled | True to enable electric dark correction otherwise it's False. |
Definition at line 1262 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_gpio_output_state | ( | self, | |
int | device_id, | ||
int | direction, | ||
int | bitmask | ||
) |
Sets the GPIO bit direction to either output or input.
device_id | The device id. |
direction | The direction value for each bit which could be true(output) or false(input). |
bitmask | The bit mask. |
Definition at line 2081 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_gpio_value | ( | self, | |
int | device_id, | ||
int | value, | ||
int | bitmask | ||
) |
Sets the GPIO bit value to either high or low.
device_id | The device id. |
value | The direction value for each bit which could be true(high) or false(low). |
bitmask | The bit mask. |
Definition at line 2114 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_integration_time | ( | self, | |
int | device_id, | ||
int | int_time | ||
) |
Sets the integration time on the device.
This should be verified to be within range prior to calling this function.
device_id | The device id. |
int_time | The new integration time in microseconds. See device manual for supported integration increment. |
Definition at line 650 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_ip_address_assigned_mode | ( | self, | |
int | device_id, | ||
bool | useDHCP | ||
) |
Set the IP address mode to the OBP2 device.
device_id | The device id. |
useDHCP | True will use DHCP generated ip address. False will use statically assigned IP address. |
Definition at line 2287 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_lamp_state | ( | self, | |
int | device_id, | ||
bool | enable | ||
) |
Enable or disable the lamp.
device_id | The device id. |
enable | True to enable lamp, False otherwise. |
Definition at line 1326 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_led_state | ( | self, | |
int | device_id, | ||
bool | isEnabled | ||
) |
Enable or disable device LED.
If the device don't have an LED then an exception will be thrown.
device_id | The device id. |
isEnabled | True to enable LED blinking otherwise it's False. |
Definition at line 1828 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_manual_network_configuration | ( | self, | |
int | device_id, | ||
LighthouseNetworkConfiguration | networkConfig | ||
) |
Write the network configuration parameters (static ip address) on OBP2 enabled device.
device_id | The device id. |
networkConfig | The network configuration object containing ip address, subnet mask, default gateway, and dns server. |
Definition at line 2366 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_nonlinearity_correction_state | ( | self, | |
int | device_id, | ||
bool | isEnabled | ||
) |
Enable or disable nonlinearity correction.
device_id | The device id. |
isEnabled | True to enable nonlinearity correction otherwise it's False. |
Definition at line 1294 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_scans_to_average | ( | self, | |
int | device_id, | ||
int | newScanToAverage | ||
) |
Sets the number of spectra to average.
device_id | The device id. |
newScanToAverage | The number of spectra to average. |
Definition at line 435 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_shutter_state | ( | self, | |
int | device_id, | ||
bool | shutterState | ||
) |
This function will open or close the shutter on the spectrometer.
device_id | The device id. |
shutterState | True will open the shutter. False will then close the shutter. |
Definition at line 1358 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_single_strobe_delay | ( | self, | |
int | device_id, | ||
int | delayMicrosecond | ||
) |
Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.
device_id | The device id. |
delayMicrosecond | The delay, in microseconds, that the single strobe should wait before the pulse begins. |
Definition at line 1535 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_single_strobe_state | ( | self, | |
int | device_id, | ||
bool | enable | ||
) |
Set the enable status of the single strobe signal.
Note that on some devices the enable control is shared with other signals (e.g. lamp enable and continuous strobe) so this may have some side-effects and changing those features may affect the single strobe as well.
device_id | The device id. |
enable | True to enable single strobe otherwise use False. |
Definition at line 1497 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_single_strobe_width | ( | self, | |
int | device_id, | ||
int | widthMicrosecond | ||
) |
Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.
device_id | The device id. |
widthMicrosecond | The duration, in microseconds, of the single strobe pulse after the rising edge occurs. Once this duration elapses, a falling edge will be generated. |
Definition at line 1570 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_stored_dark_spectrum | ( | self, | |
int | device_id, | ||
list[float] | darkSpectrum | ||
) |
Store a dark spectrum for use in subsequent corrections i.e.
dark correction and nonlinearity correction.
device_id | The device id. |
darkSpectrum | The buffer that contains the dark spectrum to be stored. |
Definition at line 969 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_tec_temperature_setpoint | ( | self, | |
int | device_id, | ||
float | temp_C | ||
) |
Apply the setpoint temperature (Celsius) in the thermo-electric cooler.
If this function is not supported by the device then an exception will be thrown.
device_id | The device id. |
temp_C | The setpoint temperature in celsius. |
Definition at line 1427 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_trigger_mode | ( | self, | |
int | device_id, | ||
int | mode | ||
) |
Set the device trigger mode.
device_id | The device id. |
mode | Trigger mode. See device manual for the supported trigger mode. |
Definition at line 702 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.set_user_string | ( | self, | |
int | device_id, | ||
str | userString | ||
) |
Set a new user string to the device.
The maximum string length is 16.
device_id | The device id. |
userString | The user string. If value is empty then an exception will be thrown. |
Definition at line 2043 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.setMulticastMsgResponseReadDelay | ( | self, | |
int | delayMs | ||
) |
Set the delay between reading multicast response.
This must be called before probing network devices.
delayMs | The delay in milliseconds before next read. |
Definition at line 174 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.setMulticastMsgResponseReadRetry | ( | self, | |
int | retryCount | ||
) |
Set the number of times to read multicast message response.
This must be called before probing network devices.
retryCount | The number of times to try reading multicast response messages. |
Definition at line 183 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.setMulticastMsgSendRetry | ( | self, | |
int | retryCount | ||
) |
Set the number of times to send multicast message for dynamic probing.
This must be called before probing network devices.
retryCount | The number of times to send messages. |
Definition at line 165 of file LighthouseAPI.py.
None Python.oceandirect.LighthouseAPI.LighthouseAPI.shutdown | ( | self | ) |
Closes the connection to OceanDirectAPI.
This is the last to be called before the program terminates.
Definition at line 159 of file LighthouseAPI.py.
|
static |
Definition at line 35 of file LighthouseAPI.py.
Python.oceandirect.LighthouseAPI.LighthouseAPI.spectrum_length_map |
Definition at line 44 of file LighthouseAPI.py.