PythonOceanDirect  1.31.0
OceanDirect Python API
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced Class Reference

Subclass containing advanced features that may or may not be in the spectrometer. More...

Public Member Functions

def __init__ (self, device)
 
def get_unformatted_spectrum_length (self)
 This returns an integer denoting the length of a raw spectrum (as returned by get_unformatted_spectrum(...)). More...
 
def get_unformatted_spectrum (self)
 Return raw spectra. More...
 
def set_enable_lamp (self, enable)
 Enable or disable the lamp. More...
 
def get_enable_lamp (self)
 Return the lamp state. More...
 
def get_wavelength_coeffs (self)
 Read the wavelength coefficients from the device. More...
 
def set_wavelength_coeffs (self, wavelengthCoeffs)
 Set the nonlinearity coefficients data into the device. More...
 
def get_nonlinearity_coeffs (self)
 Read the nonlinearity coefficients stored in the device. More...
 
def set_nonlinearity_coeffs (self, nonlinearityCoeffs)
 Set the nonlinearity coefficients data into the device. More...
 
def get_nonlinearity_coeffs_count1 (self)
 Read the nonlinearity coefficients count from the device. More...
 
def get_nonlinearity_coeffs1 (self, index)
 Read the nonlinearity coefficients count of a given position from the device. More...
 
def set_nonlinearity_coeffs1 (self, index, nl_coefficient)
 Set the nonlinearity coefficient of the given index position. More...
 
def get_tec_temperature_degrees_C (self)
 Returns the temperature reading (celsius) of a detector thermistor. More...
 
def set_tec_setpoint (self, temp_C)
 Apply the setpoint temperature (Celsius) in the thermo-electric cooler. More...
 
def set_tec_enable (self, coolerEnable)
 Enable or disable the thermo-electric cooler attached to the detector. More...
 
def get_tec_enable (self)
 Read the state of the thermo-electric cooler whether it's enable or disable. More...
 
def get_tec_setpoint (self)
 Read the set point temperature of the thermo-electric cooler. More...
 
def get_tec_stable (self)
 Returns the state of thermo-electric cooler temperature on whether it reached the stable temperature or not. More...
 
def get_tec_fan_enable (self)
 Returns the thermo-electric cooler fan state whether it's enabled or not. More...
 
def set_tec_fan_enable (self, fanEnable)
 Enable or disable the thermo-electric cooler fan. More...
 
def get_temperature_count (self)
 Reads out the number of indexed temperatures available from the device's internal memory if that feature is supported. More...
 
def get_temperature (self, index)
 Reads out an indexed temperature from the device's internal memory if that feature is supported. More...
 
def get_irrad_calibration (self)
 Get the irradiance calibration data from the device. More...
 
def set_irrad_calibration (self, iradCal)
 Set the irradiance calibration data into the device. More...
 
def get_irrad_calibration_size (self)
 Get the irradiance calibration data count. More...
 
def get_irrad_calibration_collection_area (self)
 Get the irradiance calibration collection area from the device. More...
 
def set_irrad_calibration_collection_area (self, area)
 Set the irradiance calibration collection area to the device. More...
 
def has_irrad_calibration_collection_area (self)
 Get the state on whether the irradiance calibration collection area exists or not. More...
 
def get_optical_bench_slit_width (self)
 Reads out the optical bench slit width in microns. More...
 
def set_optical_bench_slit_width (self, widthMicrons)
 Writes out the optical bench slit width in microns. More...
 
def get_optical_bench_serial_number (self)
 Reads the optical bench serial number. More...
 
def set_optical_bench_serial_number (self, benchSerialNumber)
 Writes out the optical bench serial number. More...
 
def get_optical_bench_coating (self)
 Read the optical bench coating descriptions. More...
 
def set_optical_bench_coating (self, benchCoating)
 Writes out the optical bench coating descriptions. More...
 
def get_optical_bench_filter (self)
 Read the optical bench filter descriptions. More...
 
def set_optical_bench_filter (self, benchFilter)
 Writes out the optical bench filter descriptions. More...
 
def get_optical_bench_grating (self)
 Read the optical bench grating descriptions. More...
 
def set_optical_bench_grating (self, benchGrating)
 Writes out the optical bench grating descriptions. More...
 
def get_optical_bench_fiber_diameter (self)
 Read the optical bench fiber diameter. More...
 
def set_optical_bench_fiber_diameter (self, diameterMicrons)
 Writes out the optical bench fiber diameter. More...
 
def get_optical_bench_id (self)
 Read the optical bench id. More...
 
def set_optical_bench_id (self, benchID)
 Writes out the optical bench id. More...
 
def get_light_source_count (self)
 Gets the number of light sources that are represented by the given featureID. More...
 
def has_light_source_enable (self, light_source_index)
 Queries whether the indicated light source within the given feature instance has a usable enable/disable control. More...
 
def is_light_source_enabled (self, light_source_index)
 Queries whether the indicated light source within the given feature instance is enabled (energized). More...
 
def enable_light_source (self, light_source_index, enable)
 Attempts to enable or disable the indicated light source within the given feature instance. More...
 
def light_source_has_variable_intensity (self, light_source_index)
 Queries whether the indicated light source within the given feature instance has a usable intensity control. More...
 
def get_light_source_intensity (self, light_source_index)
 Queries the intensity level of the indicated light source within the given feature instance. More...
 
def set_light_source_intensity (self, light_source_index, intensity)
 Sets the intensity level of the indicated light source within the given feature instance. More...
 
def set_single_strobe_enable (self, enable)
 Set the enable status of the single strobe signal. More...
 
def set_single_strobe_delay (self, 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...
 
def set_single_strobe_width (self, widthMicrosecond)
 Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
def get_single_strobe_enable (self)
 Get the enable status of the single strobe signal. More...
 
def get_single_strobe_delay (self)
 Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge. More...
 
def get_single_strobe_width (self)
 Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
def get_single_strobe_delay_minimum (self)
 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...
 
def get_single_strobe_delay_maximum (self)
 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...
 
def get_single_strobe_delay_increment (self)
 Gets the single strobe delay increment in microseconds. More...
 
def get_single_strobe_width_minimum (self)
 Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
def get_single_strobe_width_maximum (self)
 Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins. More...
 
def get_single_strobe_width_increment (self)
 Get the single strobe width increment. More...
 
def get_single_strobe_cycle_maximum (self)
 Gets the single strobe cycle maximum in microseconds. More...
 
def set_continuous_strobe_period (self, period)
 Sets the continuous strobe period in microseconds. More...
 
def set_continuous_strobe_enable (self, enable)
 Sets the continuous strobe enable state on the device. More...
 
def get_continuous_strobe_period (self)
 Get the continuous strobe period in microseconds. More...
 
def get_continuous_strobe_enable (self)
 Gets the continuous strobe state (enabled or disabled) of the device. More...
 
def get_continuous_strobe_period_minimum (self)
 Gets the minimum continuous strobe period of the device in microseconds. More...
 
def get_continuous_strobe_period_maximum (self)
 Gets the maximum continuous strobe period of the device in microseconds. More...
 
def get_continuous_strobe_period_increment (self)
 This function gets the current size of the strobe period increment of the device in microseconds. More...
 
def get_continuous_strobe_width (self)
 Gets the strobe width of the device in microseconds. More...
 
def set_continuous_strobe_width (self, widthMicrosecond)
 Sets the continuous strobe width on the device. More...
 
def clear_data_buffer (self)
 Clear the data buffer. More...
 
def get_data_buffer_number_of_elements (self)
 Get the number of data elements currently in the buffer. More...
 
def get_data_buffer_capacity (self)
 Get the present limit of how many data elements will be retained by the buffer. More...
 
def get_data_buffer_capacity_maximum (self)
 Get the maximum possible configurable size for the data buffer. More...
 
def get_data_buffer_capacity_minimum (self)
 Get the minimum possible configurable size for the data buffer. More...
 
def set_data_buffer_capacity (self, capacity)
 Set the number of data elements that the buffer should retain. More...
 
def set_data_buffer_enable (self, enable)
 Enable or disable data buffering. More...
 
def get_data_buffer_enable (self)
 Reads the device data buffering enable state. More...
 
def abort_acquisition (self)
 Abort spectra acquisition and put the device into an idle state. More...
 
def acquire_spectra_to_buffer (self)
 Start spectra acquisition. More...
 
def get_device_idle_state (self)
 Return device idle state. More...
 
def get_number_of_backtoback_scans (self)
 Get the number of back-to-back scans. More...
 
def set_number_of_backtoback_scans (self, numScans)
 Set the number of spectra that the device will capture per trigger event. More...
 
def get_raw_spectrum_with_metadata (self, list_raw_spectra, list_timestamp, buffer_size)
 Returns spectra with metadata information. More...
 
def get_usb_endpoint_primary_out (self)
 This function returns the usb primary OUT endpoint for the type specified. More...
 
def get_usb_endpoint_primary_in (self)
 This function returns the usb primary IN endpoint for the type specified. More...
 
def get_usb_endpoint_secondary_out (self)
 This function returns the usb secondary OUT endpoint for the type specified. More...
 
def get_usb_endpoint_secondary_in (self)
 This function returns the usb secondary IN endpoint for the type specified. More...
 
def read_eeprom_slot (self, slot_number, data_size)
 Reads data from eeprom slot. More...
 
def get_revision_hardware (self)
 Reads out the hardware revision from the device's internal memory if that feature is supported. More...
 
def get_revision_firmware (self)
 Reads out the firmware revision from the device's internal memory if that feature is supported. More...
 
def get_revision_fpga (self)
 Reads out the FPGA revision from the device's internal memory if that feature is supported. More...
 
def ipv4_is_dhcp_enabled (self, ifNum)
 Check to see if DHCP (client) is enabled on the specified interface. More...
 
def ipv4_set_dhcp_enable (self, ifNum, enabled)
 Turn the DHCP client on or off for the device on the specified interface. More...
 
def ipv4_get_number_of_ip_addresses (self, ifNum)
 Get the number of IP addresses available on the specified interface. More...
 
def ipv4_read_ip_address (self, ifNum, addressIndex, outIpAddress, outNetmask)
 Get the assigned ip address provided by the index of a particular interface. More...
 
def ipv4_add_static_ip_address (self, ifNum, ipAddress, netmask)
 Add a static IP address to the specified interface. More...
 
def ipv4_delete_static_ip_address (self, ifNum, addressIndex)
 Delete a static IP address on the specified interface. More...
 
def get_gpio_pin_count (self)
 Get GPIO pin count. More...
 
def gpio_set_output_enable1 (self, bit, isOutput)
 Sets the GPIO bit direction to either output or input. More...
 
def gpio_get_output_enable1 (self, bit)
 Get GPIO bit direction. More...
 
def gpio_set_output_enable2 (self, bitmask)
 Set the direction (input/output) of the GPIO pins. More...
 
def gpio_get_output_enable2 (self)
 Get all GPIO bit direction. More...
 
def gpio_set_value1 (self, bit, isHigh)
 Sets the GPIO bit value to either high or low. More...
 
def gpio_get_value1 (self, bit)
 Get the GPIO bit value in whether it's high(true) or low(false). More...
 
def gpio_set_value2 (self, bitmask)
 Set the logic value for all GPIO pins. More...
 
def gpio_get_value2 (self)
 Get all GPIO bit values. More...
 
def set_led_enable (self, isEnabled)
 Enable or disable device LED. More...
 
def get_led_enable (self)
 Get device LED state. More...
 
def get_device_original_vid (self)
 Get the original vendor id (VID) of the device. More...
 
def get_device_original_pid (self)
 Get the original product id (PID) of the device. More...
 
def get_device_vid (self)
 Get the current vendor id (VID) of the device. More...
 
def get_device_pid (self)
 Get the current product id (PID) of the device. More...
 
def get_device_original_manufacturer_string (self)
 Get the original manufacturer string of the device. More...
 
def get_device_original_model_string (self)
 Get the original model string of the device. More...
 
def get_device_manufacturer_string (self)
 Get the current manufacturer string of the device. More...
 
def get_device_model_string (self)
 Get the current model string of the device. More...
 
def set_device_manufacturer_string (self, manufacturer)
 Set the current manufacturer string of the device. More...
 
def set_device_model_string (self, model)
 Set the current model string of the device. More...
 
def get_command_list (self)
 Read a list of commands supported by the device. More...
 
def set_serial_number (self, serialNumber)
 Sets the serial number of the device. More...
 
def get_device_alias (self)
 Read the device alias from the device. More...
 
def set_device_alias (self, deviceAlias)
 Set a new device alias to the device. More...
 
def reset_device (self)
 Restarts the device. More...
 
def get_user_string (self)
 Read the user string from the device. More...
 
def set_user_string (self, userString)
 Set a new user string to the device. More...
 
def get_user_string_count2 (self)
 Read the total user string count from the device. More...
 
def get_user_string2 (self, index)
 Read the user string from the device. More...
 
def set_user_string2 (self, index, userString)
 Write the user string to the device. More...
 
def get_autonull_maximum_adc_count (self)
 Read the maximum ADC counts. More...
 
def set_autonull_baseline_level (self, baselineLevel)
 Set the new baseline level. More...
 
def get_autonull_baseline_level (self)
 Read the baseline level. More...
 
def set_autonull_saturation_level (self, saturation)
 Set the new saturation level. More...
 
def get_autonull_saturation_level (self)
 Read the saturation level. More...
 
def get_baud_rate (self)
 Read the device RS-232 baud rate. More...
 
def set_baud_rate (self, baudRate)
 Set a new baud rate for the RS-232 port. More...
 
def save_settings_to_flash (self)
 Save settings to flash. More...
 
def get_active_pixel_range (self)
 Read the active pixel range from the sensor pixel array. More...
 
def get_optical_dark_pixel_range (self)
 Read the optical dark pixel range from the sensor pixel array. More...
 
def get_transition_pixel_range (self)
 Read the transition pixel range from the sensor pixel array. More...
 
def get_bad_pixel_indices (self)
 Read bad pixel indices from the sensor pixel array. More...
 
def set_bad_pixel_indices (self, badPixelIndices)
 Mark the given pixel indices as bad pixels. More...
 

Public Attributes

 device
 

Static Public Attributes

 lamp_on = c_ubyte(1)
 
 lamp_off = c_ubyte(0)
 
int num_nonlinearity_coeffs = 8
 

Detailed Description

Subclass containing advanced features that may or may not be in the spectrometer.

The spectrometer specification guide (manual) should be consulted prior to using any of these features.

Definition at line 1344 of file OceanDirectAPI.py.

Constructor & Destructor Documentation

◆ __init__()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.__init__ (   self,
  device 
)

Definition at line 1354 of file OceanDirectAPI.py.

Member Function Documentation

◆ abort_acquisition()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.abort_acquisition (   self)

Abort spectra acquisition and put the device into an idle state.

To resume spectra acquisition, you have to call acquire_spectra_to_buffer() first before calling the get spectra command. Very few devices supported this command.

Definition at line 2750 of file OceanDirectAPI.py.

◆ acquire_spectra_to_buffer()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.acquire_spectra_to_buffer (   self)

Start spectra acquisition.

This would transition the device into a non-idle state. Very few devices supported this command. An exception will be thrown if the command is not supported by the device.

Definition at line 2764 of file OceanDirectAPI.py.

◆ clear_data_buffer()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.clear_data_buffer (   self)

Clear the data buffer.

An exception will be thrown if the command is not supported by the device.

Definition at line 2625 of file OceanDirectAPI.py.

◆ enable_light_source()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.enable_light_source (   self,
  light_source_index,
  enable 
)

Attempts to enable or disable the indicated light source within the given feature instance.

Not all light sources have an enable/disable control, and this capability can be queried with has_light_source_enable(). Note that an enabled light source should emit light according to its last (or default) intensity setting which might be the minimum; in this case, the light source might appear to remain off.

Parameters
[in]light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
[in]enableWhether to enable the light source. A value of False will attempt to disable the light source, and any other value will enable it.

Definition at line 2170 of file OceanDirectAPI.py.

◆ get_active_pixel_range()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_active_pixel_range (   self)

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.

Returns
A list of active pixel range.

Definition at line 3791 of file OceanDirectAPI.py.

◆ get_autonull_baseline_level()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_baseline_level (   self)

Read the baseline level.

Returns
The baseline level.

Definition at line 3703 of file OceanDirectAPI.py.

◆ get_autonull_maximum_adc_count()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_maximum_adc_count (   self)

Read the maximum ADC counts.

Returns
The ADC counts.

Definition at line 3673 of file OceanDirectAPI.py.

◆ get_autonull_saturation_level()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_autonull_saturation_level (   self)

Read the saturation level.

Most devices returns 65535.

Returns
The saturation level.

Definition at line 3733 of file OceanDirectAPI.py.

◆ get_bad_pixel_indices()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_bad_pixel_indices (   self)

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.

Returns
A list of bad pixel indices.

Definition at line 3845 of file OceanDirectAPI.py.

◆ get_baud_rate()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_baud_rate (   self)

Read the device RS-232 baud rate.

Not all devices supported this command.

Returns
The baud rate.

Definition at line 3749 of file OceanDirectAPI.py.

◆ get_command_list()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_command_list (   self)

Read a list of commands supported by the device.

Returns
A list of command code.

Definition at line 3486 of file OceanDirectAPI.py.

◆ get_continuous_strobe_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_enable (   self)

Gets the continuous strobe state (enabled or disabled) of the device.

Returns
True if continuous strobe is enabled otherwise it's False.

Definition at line 2534 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period (   self)

Get the continuous strobe period in microseconds.

Returns
the period in microseconds.

Definition at line 2519 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period_increment()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period_increment (   self)

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.

Returns
The current strobe period increment in microseconds.

Definition at line 2579 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period_maximum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period_maximum (   self)

Gets the maximum continuous strobe period of the device in microseconds.

Returns
The maximum strobe period in microseconds.

Definition at line 2564 of file OceanDirectAPI.py.

◆ get_continuous_strobe_period_minimum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_period_minimum (   self)

Gets the minimum continuous strobe period of the device in microseconds.

Returns
The minimum strobe period in microseconds.

Definition at line 2549 of file OceanDirectAPI.py.

◆ get_continuous_strobe_width()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_continuous_strobe_width (   self)

Gets the strobe width of the device in microseconds.

Returns
The current strobe width in microseconds.

Definition at line 2597 of file OceanDirectAPI.py.

◆ get_data_buffer_capacity()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_capacity (   self)

Get the present limit of how many data elements will be retained by the buffer.

This value can be changed with set_data_buffer_capacity(). An exception will be thrown if the command is not supported by the device.

Returns
A count of how many items the buffer will store before data may be lost.

Definition at line 2653 of file OceanDirectAPI.py.

◆ get_data_buffer_capacity_maximum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_capacity_maximum (   self)

Get the maximum possible configurable size for the data buffer.

An exception will be thrown if the command is not supported by the device.

Returns
The largest value that may be set with set_data_buffer_capacity().

Definition at line 2670 of file OceanDirectAPI.py.

◆ get_data_buffer_capacity_minimum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_capacity_minimum (   self)

Get the minimum possible configurable size for the data buffer.

An exception will be thrown if the command is not supported by the device.

Returns
The smallest value that may be set with set_data_buffer_capacity().

Definition at line 2686 of file OceanDirectAPI.py.

◆ get_data_buffer_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_enable (   self)

Reads the device data buffering enable state.

An exception will be thrown if the command is not supported by the device.

Returns
True if data buffering is enabled otherwise it's False.

Definition at line 2734 of file OceanDirectAPI.py.

◆ get_data_buffer_number_of_elements()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_data_buffer_number_of_elements (   self)

Get the number of data elements currently in the buffer.

An exception will be thrown if the command is not supported by the device.

Returns
A count of how many items are available for retrieval from the buffer.

Definition at line 2637 of file OceanDirectAPI.py.

◆ get_device_alias()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_alias (   self)

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.

Returns
The device alias.

Definition at line 3530 of file OceanDirectAPI.py.

◆ get_device_idle_state()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_idle_state (   self)

Return device idle state.

Very few devices supported this command. An exception will be thrown if the command is not supported by the device.

Returns
True if the device is idle otherwise it's False.

Definition at line 2778 of file OceanDirectAPI.py.

◆ get_device_manufacturer_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_manufacturer_string (   self)

Get the current manufacturer string of the device.

Returns
The manufacturer string.

Definition at line 3382 of file OceanDirectAPI.py.

◆ get_device_model_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_model_string (   self)

Get the current model string of the device.

Returns
The model string.

Definition at line 3399 of file OceanDirectAPI.py.

◆ get_device_original_manufacturer_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_manufacturer_string (   self)

Get the original manufacturer string of the device.

Returns
The manufacturer string.

Definition at line 3348 of file OceanDirectAPI.py.

◆ get_device_original_model_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_model_string (   self)

Get the original model string of the device.

Returns
The model string.

Definition at line 3365 of file OceanDirectAPI.py.

◆ get_device_original_pid()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_pid (   self)

Get the original product id (PID) of the device.

Returns
The PID.

Definition at line 3300 of file OceanDirectAPI.py.

◆ get_device_original_vid()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_original_vid (   self)

Get the original vendor id (VID) of the device.

Returns
The VID.

Definition at line 3284 of file OceanDirectAPI.py.

◆ get_device_pid()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_pid (   self)

Get the current product id (PID) of the device.

Returns
The PID.

Definition at line 3332 of file OceanDirectAPI.py.

◆ get_device_vid()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_device_vid (   self)

Get the current vendor id (VID) of the device.

Returns
The VID.

Definition at line 3316 of file OceanDirectAPI.py.

◆ get_enable_lamp()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_enable_lamp (   self)

Return the lamp state.

Returns
True if lamp is ON otherwise False.

Definition at line 1410 of file OceanDirectAPI.py.

◆ get_gpio_pin_count()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_gpio_pin_count (   self)

Get GPIO pin count.

Returns
The pin count.

Definition at line 3114 of file OceanDirectAPI.py.

◆ get_irrad_calibration()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_irrad_calibration (   self)

Get the irradiance calibration data from the device.

Returns
The irradiance calibration data which is an array of float.

Definition at line 1736 of file OceanDirectAPI.py.

◆ get_irrad_calibration_collection_area()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_irrad_calibration_collection_area (   self)

Get the irradiance calibration collection area from the device.

Returns
The collection area value.

Definition at line 1797 of file OceanDirectAPI.py.

◆ get_irrad_calibration_size()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_irrad_calibration_size (   self)

Get the irradiance calibration data count.

Returns
The calibration data count.

Definition at line 1781 of file OceanDirectAPI.py.

◆ get_led_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_led_enable (   self)

Get device LED state.

If the device don't have an LED then an exception will be thrown.

Returns
True if LED is enabled otherwise it's False.

Definition at line 3268 of file OceanDirectAPI.py.

◆ get_light_source_count()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_light_source_count (   self)

Gets the number of light sources that are represented by the given featureID.

Such light sources could be individual LEDs, light bulbs, lasers, etc. Each of these light sources may have different capabilities, such as programmable intensities and enables, which should be queried before they are used.

Returns
The number of light sources (e.g. bulbs) in the indicated feature

Definition at line 2114 of file OceanDirectAPI.py.

◆ get_light_source_intensity()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_light_source_intensity (   self,
  light_source_index 
)

Queries the intensity level of the indicated light source within the given feature instance.

The intensity is normalized over the range [0, 1], with 0 as the minimum and 1 as the maximum.

SAFETY WARNING: a light source at its minimum intensity (0) might still emit light, and in some cases, this may be harmful radiation. A value of 0 indicates the minimum of the programmable range for the light source, and does not necessarily turn the light source off. To disable a light source completely, use enable_light_source() if the device supports this feature, or provide some other mechanism to allow the light to be disabled or blocked by the operator.

In some `cases, the intensity may refer to the duty cycle of a pulsed light source instead of a continuous power rating. The actual power output of the light source might not vary linearly with the reported intensity, so independent measurement or calibration of the light source may be necessary.`

Parameters
[in]light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
Returns
Real-valued result (as a double-precision floating point number) over the range [0, 1] where 0 represents the minimum programmable intensity level and 1 indicates the maximum. Note that the minimum intensity level might still allow the light source to produce light.

Definition at line 2214 of file OceanDirectAPI.py.

◆ get_nonlinearity_coeffs()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_nonlinearity_coeffs (   self)

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.

Returns
A list of nonlinearity coefficients.

Definition at line 1465 of file OceanDirectAPI.py.

◆ get_nonlinearity_coeffs1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_nonlinearity_coeffs1 (   self,
  index 
)

Read the nonlinearity coefficients count of a given position from the device.

This command is being used in legacy devices. If the device don't support this command then a non-zero error code will be returned. Use the function "get_nonlinearity_coeffs_count1()" to get the correct range of the index value.

Parameters
[in]indexA zero based value referring to the coefficient position.
Returns
The nonlinearity coefficients.

Definition at line 1523 of file OceanDirectAPI.py.

◆ get_nonlinearity_coeffs_count1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_nonlinearity_coeffs_count1 (   self)

Read the nonlinearity coefficients count from the device.

This command is being used in legacy devices. If the device don't support this command then a non-zero error code will be returned.

Returns
The nonlinearity coefficients count.

Definition at line 1506 of file OceanDirectAPI.py.

◆ get_number_of_backtoback_scans()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_number_of_backtoback_scans (   self)

Get the number of back-to-back scans.

See device manual if data buffering is supported.

Returns
The back-to-back scan value.

Definition at line 2795 of file OceanDirectAPI.py.

◆ get_optical_bench_coating()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_coating (   self)

Read the optical bench coating descriptions.

If this function is not supported by the device then an exception will be thrown.

Returns
The bench coating.

Definition at line 1924 of file OceanDirectAPI.py.

◆ get_optical_bench_fiber_diameter()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_fiber_diameter (   self)

Read the optical bench fiber diameter.

If this function is not supported by the device then an exception will be thrown.

Returns
The bench fiber diameter.

Definition at line 2035 of file OceanDirectAPI.py.

◆ get_optical_bench_filter()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_filter (   self)

Read the optical bench filter descriptions.

If this function is not supported by the device then an exception will be thrown.

Returns
The bench filter.

Definition at line 1961 of file OceanDirectAPI.py.

◆ get_optical_bench_grating()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_grating (   self)

Read the optical bench grating descriptions.

If this function is not supported by the device then an exception will be thrown.

Returns
The bench grating.

Definition at line 1998 of file OceanDirectAPI.py.

◆ get_optical_bench_id()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_id (   self)

Read the optical bench id.

If this function is not supported by the device then an exception will be thrown.

Returns
The bench id.

Definition at line 2067 of file OceanDirectAPI.py.

◆ get_optical_bench_serial_number()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_serial_number (   self)

Reads the optical bench serial number.

If this function is not supported by the device then an exception will be thrown.

Returns
The serial number

Definition at line 1887 of file OceanDirectAPI.py.

◆ get_optical_bench_slit_width()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_bench_slit_width (   self)

Reads out the optical bench slit width in microns.

If this function is not supported by the device then an exception will be thrown. If this field in the device is not yet populated then a non-zero(6) code will be returned.

Returns
The width in microns.

Definition at line 1853 of file OceanDirectAPI.py.

◆ get_optical_dark_pixel_range()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_optical_dark_pixel_range (   self)

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.

Returns
A list of optical dark pixel range.

Definition at line 3809 of file OceanDirectAPI.py.

◆ get_raw_spectrum_with_metadata()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_raw_spectrum_with_metadata (   self,
  list_raw_spectra,
  list_timestamp,
  buffer_size 
)

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.

Parameters
[in]list_raw_spectraThe spectra output buffer.
[in]list_timestampThe timestamp output buffer of each spectra.
[in]buffer_sizeThe buffer array size (maximum is 15).
Returns
The number of spectra read. It can be zero.

Definition at line 2826 of file OceanDirectAPI.py.

◆ get_revision_firmware()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_revision_firmware (   self)

Reads out the firmware revision from the device's internal memory if that feature is supported.

Returns
The firmware revision.

Definition at line 2963 of file OceanDirectAPI.py.

◆ get_revision_fpga()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_revision_fpga (   self)

Reads out the FPGA revision from the device's internal memory if that feature is supported.

Returns
The fpga revision.

Definition at line 2979 of file OceanDirectAPI.py.

◆ get_revision_hardware()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_revision_hardware (   self)

Reads out the hardware revision from the device's internal memory if that feature is supported.

If the device don't support this command then an exception will be thrown.

Returns
The hardware revision.

Definition at line 2946 of file OceanDirectAPI.py.

◆ get_single_strobe_cycle_maximum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_cycle_maximum (   self)

Gets the single strobe cycle maximum in microseconds.

Returns
The maximum cycle value.

Definition at line 2467 of file OceanDirectAPI.py.

◆ get_single_strobe_delay()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay (   self)

Get the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Returns
The delay in microseconds.

Definition at line 2344 of file OceanDirectAPI.py.

◆ get_single_strobe_delay_increment()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay_increment (   self)

Gets the single strobe delay increment in microseconds.

Returns
The delay increment.

Definition at line 2408 of file OceanDirectAPI.py.

◆ get_single_strobe_delay_maximum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay_maximum (   self)

Get the maximum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Returns
The maximum delay in microseconds.

Definition at line 2392 of file OceanDirectAPI.py.

◆ get_single_strobe_delay_minimum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_delay_minimum (   self)

Get the minimum amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Returns
The minimum delay in microseconds.

Definition at line 2376 of file OceanDirectAPI.py.

◆ get_single_strobe_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_enable (   self)

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.

Returns
True if single strobe is enabled otherwise it's False.

Definition at line 2326 of file OceanDirectAPI.py.

◆ get_single_strobe_width()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width (   self)

Get the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Returns
The pulse width in microseconds.

Definition at line 2360 of file OceanDirectAPI.py.

◆ get_single_strobe_width_increment()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width_increment (   self)

Get the single strobe width increment.

Returns
The width increment.

Definition at line 2453 of file OceanDirectAPI.py.

◆ get_single_strobe_width_maximum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width_maximum (   self)

Get the maximum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Returns
The maximum width in microseconds.

Definition at line 2438 of file OceanDirectAPI.py.

◆ get_single_strobe_width_minimum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_single_strobe_width_minimum (   self)

Get the minimum amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Returns
The minimum width in microseconds.

Definition at line 2422 of file OceanDirectAPI.py.

◆ get_tec_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_enable (   self)

Read the state of the thermo-electric cooler whether it's enable or disable.

If this function is not supported by the device then an exception will be thrown.

Returns
True if the thermo-electric cooler is enabled, False otherwise.

Definition at line 1610 of file OceanDirectAPI.py.

◆ get_tec_fan_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_fan_enable (   self)

Returns the thermo-electric cooler fan state whether it's enabled or not.

Few devices have cooler fan. If this function is not supported by the device then an exception will be thrown.

Returns
True if the fan is enabled, False otherwise.

Definition at line 1659 of file OceanDirectAPI.py.

◆ get_tec_setpoint()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_setpoint (   self)

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.

Returns
The temperature value in celsius.

Definition at line 1626 of file OceanDirectAPI.py.

◆ get_tec_stable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_stable (   self)

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.

Returns
True if it's stable, False otherwise.

Definition at line 1643 of file OceanDirectAPI.py.

◆ get_tec_temperature_degrees_C()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_tec_temperature_degrees_C (   self)

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.

Returns
The temperature in degrees celsius.

Definition at line 1561 of file OceanDirectAPI.py.

◆ get_temperature()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_temperature (   self,
  index 
)

Reads out an indexed temperature from the device's internal memory if that feature is supported.

Parameters
[in]indexAn index for the device's temperature sensors. Index starts with 0 value.
Returns
The temperature in celsius.

Definition at line 1711 of file OceanDirectAPI.py.

◆ get_temperature_count()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_temperature_count (   self)

Reads out the number of indexed temperatures available from the device's internal memory if that feature is supported.

Returns
The number of temperatures available

Definition at line 1691 of file OceanDirectAPI.py.

◆ get_transition_pixel_range()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_transition_pixel_range (   self)

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.

Returns
A list of transition pixel range.

Definition at line 3827 of file OceanDirectAPI.py.

◆ get_unformatted_spectrum()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_unformatted_spectrum (   self)

Return raw spectra.

Spectra format may vary depending on device type. For spectra that has metadata, that section is stripped out. User should never use this method. This is use for debugging and performance testing.

Returns
An unformatted spectra (an array of bytes).

Definition at line 1374 of file OceanDirectAPI.py.

◆ get_unformatted_spectrum_length()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_unformatted_spectrum_length (   self)

This returns an integer denoting the length of a raw spectrum (as returned by get_unformatted_spectrum(...)).

Returns
The length of an unformatted spectrum.

Definition at line 1358 of file OceanDirectAPI.py.

◆ get_usb_endpoint_primary_in()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_primary_in (   self)

This function returns the usb primary IN endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2875 of file OceanDirectAPI.py.

◆ get_usb_endpoint_primary_out()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_primary_out (   self)

This function returns the usb primary OUT endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2858 of file OceanDirectAPI.py.

◆ get_usb_endpoint_secondary_in()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_secondary_in (   self)

This function returns the usb secondary IN endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2909 of file OceanDirectAPI.py.

◆ get_usb_endpoint_secondary_out()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_usb_endpoint_secondary_out (   self)

This function returns the usb secondary OUT endpoint for the type specified.

If the type is not supported by the device, a zero is returned. 0 is normally the control endpoint. That value is not valid in this context.

Returns
The usb endpoint address.

Definition at line 2892 of file OceanDirectAPI.py.

◆ get_user_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_user_string (   self)

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. This is the command supported for the newer OBP2.0 enabled devices.

Returns
The user string.

Definition at line 3578 of file OceanDirectAPI.py.

◆ get_user_string2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_user_string2 (   self,
  index 
)

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. If the device don't support this command then a non-zero error code will be returned. This command is used by legacy devices.

Returns
The user string.

Definition at line 3633 of file OceanDirectAPI.py.

◆ get_user_string_count2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_user_string_count2 (   self)

Read the total user string count from the device.

If the device don't support this command then a non-zero error code will be returned. This command is used by legacy devices.

Returns
The string count.

Definition at line 3616 of file OceanDirectAPI.py.

◆ get_wavelength_coeffs()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.get_wavelength_coeffs (   self)

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.

Returns
List of wavelength coefficient values.

Definition at line 1425 of file OceanDirectAPI.py.

◆ gpio_get_output_enable1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_output_enable1 (   self,
  bit 
)

Get GPIO bit direction.

Parameters
[in]bitThe bit position.
Returns
The bit direction which could be True(out) or False(in)

Definition at line 3145 of file OceanDirectAPI.py.

◆ gpio_get_output_enable2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_output_enable2 (   self)

Get all GPIO bit direction.

Returns
All bit (int) direction where each bit could be True(out) or False(in).

Definition at line 3176 of file OceanDirectAPI.py.

◆ gpio_get_value1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_value1 (   self,
  bit 
)

Get the GPIO bit value in whether it's high(true) or low(false).

Parameters
[in]bitThe bit position.
Returns
The bit value. True for high and False for low.

Definition at line 3207 of file OceanDirectAPI.py.

◆ gpio_get_value2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_get_value2 (   self)

Get all GPIO bit values.

Returns
All bit value (int) where each bit could be True(high) or False(low).

Definition at line 3238 of file OceanDirectAPI.py.

◆ gpio_set_output_enable1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_output_enable1 (   self,
  bit,
  isOutput 
)

Sets the GPIO bit direction to either output or input.

Parameters
[in]bitThe bit position.
[in]isOutputThe bit value which could be true(output) or false(input).

Definition at line 3130 of file OceanDirectAPI.py.

◆ gpio_set_output_enable2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_output_enable2 (   self,
  bitmask 
)

Set the direction (input/output) of the GPIO pins.

Parameters
[in]bitmaskThe bit mask specifying the pin directions i.e. the nth bit set to 1 sets the nth pin to output.

Definition at line 3162 of file OceanDirectAPI.py.

◆ gpio_set_value1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_value1 (   self,
  bit,
  isHigh 
)

Sets the GPIO bit value to either high or low.

Parameters
[in]bitThe bit position.
[in]isHighThe bit value which could be true(high) or false(low).

Definition at line 3192 of file OceanDirectAPI.py.

◆ gpio_set_value2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.gpio_set_value2 (   self,
  bitmask 
)

Set the logic value for all GPIO pins.

Parameters
[in]bitmaskThe bit mask specifying the logic level of each GPIO pin.

Definition at line 3224 of file OceanDirectAPI.py.

◆ has_irrad_calibration_collection_area()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.has_irrad_calibration_collection_area (   self)

Get the state on whether the irradiance calibration collection area exists or not.

Returns
True if the collection area value is present otherwise it's False.

Definition at line 1838 of file OceanDirectAPI.py.

◆ has_light_source_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.has_light_source_enable (   self,
  light_source_index 
)

Queries whether the indicated light source within the given feature instance has a usable enable/disable control.

If this returns False (meaning no enable available) then calling enable_light_source() or is_light_source_enabled() is likely to result in an error.

Parameters
[in]light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query
Returns
False to indicate specified light source cannot be enabled/disabled. True to indicate specified light source can be enabled/disabled with enable_light_source()

Definition at line 2132 of file OceanDirectAPI.py.

◆ ipv4_add_static_ip_address()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_add_static_ip_address (   self,
  ifNum,
  ipAddress,
  netmask 
)

Add a static IP address to the specified interface.

The IP address is specified as 4 bytes in an array. The leading part of the IP address must contain the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array. See device manual if TCP/IP connection is supported.

Parameters
[in]ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
[in]ipAddressThe static IP address to be added. This is 4-byte array data.
[in]netmaskAn 8-bit network mask specifying the subnet of the network the device is on.

Definition at line 3071 of file OceanDirectAPI.py.

◆ ipv4_delete_static_ip_address()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_delete_static_ip_address (   self,
  ifNum,
  addressIndex 
)

Delete a static IP address on the specified interface.

See device manual if TCP/IP connection is supported.

Parameters
[in]ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
[in]addressIndexThe index of the address to be deleted.

Definition at line 3099 of file OceanDirectAPI.py.

◆ ipv4_get_number_of_ip_addresses()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_get_number_of_ip_addresses (   self,
  ifNum 
)

Get the number of IP addresses available on the specified interface.

If DHCP is enabled on the specified interface then index 0 represents the DHCP address and the following addresses will be any static IP addresses. See device manual if TCP/IP connection is supported.

Parameters
[in]ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
The number of IP addresses on the specified interface.

Definition at line 3029 of file OceanDirectAPI.py.

◆ ipv4_is_dhcp_enabled()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_is_dhcp_enabled (   self,
  ifNum 
)

Check to see if DHCP (client) is enabled on the specified interface.

If DHCP is enabled then the device will be able to receive an IP address from a DHCP server in the network it is connected to. See device manual if TCP/IP connection is supported.

Parameters
[in]ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
True if DHCP is enabled on the specified interface otherwise it's False.

Definition at line 2995 of file OceanDirectAPI.py.

◆ ipv4_read_ip_address()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_read_ip_address (   self,
  ifNum,
  addressIndex,
  outIpAddress,
  outNetmask 
)

Get the assigned ip address provided by the index of a particular interface.

See device manual if TCP/IP connection is supported.

Parameters
[in]ifNumThe network interface. 0 for ethernet, 1 for wifi.
[in]addressIndexThe location of the ip address. Starts with 0.
[out]outIpAddressThe ip address which is a list of 4 numbers.
[out]outNetmaskThe network mask of the ip address. Value range is from 0-32

Definition at line 3047 of file OceanDirectAPI.py.

◆ ipv4_set_dhcp_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.ipv4_set_dhcp_enable (   self,
  ifNum,
  enabled 
)

Turn the DHCP client on or off for the device on the specified interface.

See device manual if TCP/IP connection is supported.

Parameters
[in]ifNumThe interface number: 0 for Ethernet, 1 for wi-fi.
[in]enabledFalse turns the DHCP client off. True turns the DHCP client on.

Definition at line 3013 of file OceanDirectAPI.py.

◆ is_light_source_enabled()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.is_light_source_enabled (   self,
  light_source_index 
)

Queries whether the indicated light source within the given feature instance is enabled (energized).

Parameters
[in]light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
Returns
False to indicate specified light source is disabled (should emit no light). True to indicate specified light source is enabled (should emit light depending on configured intensity setting).

Definition at line 2152 of file OceanDirectAPI.py.

◆ light_source_has_variable_intensity()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.light_source_has_variable_intensity (   self,
  light_source_index 
)

Queries whether the indicated light source within the given feature instance has a usable intensity control.

If this returns False (meaning no control available) then calling set_light_source_intensity() or get_light_source_intensity() is likely to result in an error.

Parameters
[in]light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
Returns
False to indicate specified light source cannot have its intensity changed. True to indicate the specified light source can have its intensity controlled with set_light_source_intensity().

Definition at line 2194 of file OceanDirectAPI.py.

◆ read_eeprom_slot()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.read_eeprom_slot (   self,
  slot_number,
  data_size 
)

Reads data from eeprom slot.

Since the value read from the slot can be of any type, this function will just returns a byte array and the caller must do the necessary data transformation (ex: convert it to float or int).

Parameters
[in]slot_numberThe slot number.
[in]data_sizeThe number of bytes to read.
Returns
An array of bytes.

Definition at line 2926 of file OceanDirectAPI.py.

◆ reset_device()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.reset_device (   self)

Restarts the device.

Definition at line 3566 of file OceanDirectAPI.py.

◆ save_settings_to_flash()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.save_settings_to_flash (   self)

Save settings to flash.

Not all devices supported this command.

Definition at line 3779 of file OceanDirectAPI.py.

◆ set_autonull_baseline_level()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_autonull_baseline_level (   self,
  baselineLevel 
)

Set the new baseline level.

Parameters
[in]baselineLevelThe baseline value.

Definition at line 3689 of file OceanDirectAPI.py.

◆ set_autonull_saturation_level()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_autonull_saturation_level (   self,
  saturation 
)

Set the new saturation level.

Parameters
[in]saturationThe saturation value.

Definition at line 3719 of file OceanDirectAPI.py.

◆ set_bad_pixel_indices()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_bad_pixel_indices (   self,
  badPixelIndices 
)

Mark the given pixel indices as bad pixels.

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.

Parameters
[in]badPixelIndicesnonlinearityCoeffs The nonlinearity coefficients data which is an array of float.
Returns
Number of bytes written to the device.

Definition at line 3863 of file OceanDirectAPI.py.

◆ set_baud_rate()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_baud_rate (   self,
  baudRate 
)

Set a new baud rate for the RS-232 port.

Not all devices supported this command.

Parameters
[in]baudRateThe baud rate value.

Definition at line 3765 of file OceanDirectAPI.py.

◆ set_continuous_strobe_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_continuous_strobe_enable (   self,
  enable 
)

Sets the continuous strobe enable state on the device.

Parameters
[in]enableA 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 2496 of file OceanDirectAPI.py.

◆ set_continuous_strobe_period()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_continuous_strobe_period (   self,
  period 
)

Sets the continuous strobe period in microseconds.

Parameters
[in]periodThe new period of the continuous strobe measured in microseconds

Definition at line 2482 of file OceanDirectAPI.py.

◆ set_continuous_strobe_width()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_continuous_strobe_width (   self,
  widthMicrosecond 
)

Sets the continuous strobe width on the device.

Parameters
[in]widthMicrosecondThe new width of the continuous strobe measured in microseconds.

Definition at line 2611 of file OceanDirectAPI.py.

◆ set_data_buffer_capacity()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_data_buffer_capacity (   self,
  capacity 
)

Set the number of data elements that the buffer should retain.

This function must be used with "set_number_of_backtoback_scans()". An exception will be thrown if the command is not supported by the device.

Parameters
[in]capacityLimit on the number of data elements to store. This is bounded by what is returned by get_data_buffer_capacity_minimum() and get_data_buffer_capacity_maximum().

Definition at line 2702 of file OceanDirectAPI.py.

◆ set_data_buffer_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_data_buffer_enable (   self,
  enable 
)

Enable or disable data buffering.

An exception will be thrown if the command is not supported by the device.

Parameters
[in]enableTrue enable the buffer. False disable the buffer.

Definition at line 2719 of file OceanDirectAPI.py.

◆ set_device_alias()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_device_alias (   self,
  deviceAlias 
)

Set a new device alias to the device.

Parameters
[in]deviceAliasThe device alias. If value is empty then an exception will be thrown.

Definition at line 3547 of file OceanDirectAPI.py.

◆ set_device_manufacturer_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_device_manufacturer_string (   self,
  manufacturer 
)

Set the current manufacturer string of the device.

Parameters
[in]manufacturerThe new manufacturer string.

Definition at line 3416 of file OceanDirectAPI.py.

◆ set_device_model_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_device_model_string (   self,
  model 
)

Set the current model string of the device.

Parameters
[in]modelThe new model string.

Definition at line 3433 of file OceanDirectAPI.py.

◆ set_enable_lamp()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_enable_lamp (   self,
  enable 
)

Enable or disable the lamp.

Parameters
[in]enableTrue to enable lamp, False otherwise.

Definition at line 1392 of file OceanDirectAPI.py.

◆ set_irrad_calibration()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_irrad_calibration (   self,
  iradCal 
)

Set the irradiance calibration data into the device.

Parameters
[in]iradCalThe irradiance calibration data which is an array of float.

Definition at line 1761 of file OceanDirectAPI.py.

◆ set_irrad_calibration_collection_area()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_irrad_calibration_collection_area (   self,
  area 
)

Set the irradiance calibration collection area to the device.

Parameters
[in]areaThe collection area.

Definition at line 1818 of file OceanDirectAPI.py.

◆ set_led_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_led_enable (   self,
  isEnabled 
)

Enable or disable device LED.

If the device don't have an LED then an exception will be thrown.

Parameters
[in]isEnabledTrue to enable LED blinking otherwise it's False.

Definition at line 3254 of file OceanDirectAPI.py.

◆ set_light_source_intensity()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_light_source_intensity (   self,
  light_source_index,
  intensity 
)

Sets the intensity level of the indicated light source within the given feature instance.

The intensity is normalized over the range [0, 1], with 0 as the minimum and 1 as the maximum.

SAFETY WARNING: a light source at its minimum intensity (0) might still emit light, and in some cases, this may be harmful radiation. A value of 0 indicates the minimum of the programmable range for the light source, and does not necessarily turn the light source off. To disable a light source completely, use enable_light_source() if the device supports this feature, or provide some other mechanism to allow the light to be disabled or blocked by the operator.

In some cases, the intensity may refer to the duty cycle of a pulsed light source instead of a continuous power rating. The actual power output of the light source might not vary linearly with the reported intensity, so independent measurement or calibration of the light source may be necessary.

Parameters
[in]light_source_indexWhich of potentially many light sources (LEDs, lasers, light bulbs) within the indicated feature instance to query.
[in]intensityThe target intensity of the light source in the range [0, 1].

Definition at line 2245 of file OceanDirectAPI.py.

◆ set_nonlinearity_coeffs()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_nonlinearity_coeffs (   self,
  nonlinearityCoeffs 
)

Set the nonlinearity coefficients data into 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.

Parameters
[in]nonlinearityCoeffsThe nonlinearity coefficients data which is an array of float.
Returns
Number of bytes written to the device.

Definition at line 1484 of file OceanDirectAPI.py.

◆ set_nonlinearity_coeffs1()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_nonlinearity_coeffs1 (   self,
  index,
  nl_coefficient 
)

Set the nonlinearity coefficient of the given index position.

This command is being used in legacy devices. If the device don't support this command then a non-zero error code will be returned. Use the function "get_nonlinearity_coeffs_count1()" to get the correct range of the index value.

Parameters
[in]indexA zero based value referring to the coefficient position.
[in]nl_coefficientThe coefficient value.

Definition at line 1544 of file OceanDirectAPI.py.

◆ set_number_of_backtoback_scans()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_number_of_backtoback_scans (   self,
  numScans 
)

Set the number of spectra that the device will capture per trigger event.

This function requires data buffer to be enabled. See "set_data_buffer_enable()". See device manual if data buffering is supported.

Parameters
[in]numScansThe back-to-back scan value.

Definition at line 2811 of file OceanDirectAPI.py.

◆ set_optical_bench_coating()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_coating (   self,
  benchCoating 
)

Writes out the optical bench coating descriptions.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]benchCoatingThe optical bench coating.

Definition at line 1941 of file OceanDirectAPI.py.

◆ set_optical_bench_fiber_diameter()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_fiber_diameter (   self,
  diameterMicrons 
)

Writes out the optical bench fiber diameter.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]diameterMicronsThe optical bench fiber diameter in microns.

Definition at line 2051 of file OceanDirectAPI.py.

◆ set_optical_bench_filter()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_filter (   self,
  benchFilter 
)

Writes out the optical bench filter descriptions.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]benchFilterThe optical bench filter.

Definition at line 1978 of file OceanDirectAPI.py.

◆ set_optical_bench_grating()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_grating (   self,
  benchGrating 
)

Writes out the optical bench grating descriptions.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]benchGratingThe optical bench grating.

Definition at line 2015 of file OceanDirectAPI.py.

◆ set_optical_bench_id()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_id (   self,
  benchID 
)

Writes out the optical bench id.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]benchIDThe optical bench id.

Definition at line 2084 of file OceanDirectAPI.py.

◆ set_optical_bench_serial_number()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_serial_number (   self,
  benchSerialNumber 
)

Writes out the optical bench serial number.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]benchSerialNumberThe optical bench serial number.

Definition at line 1904 of file OceanDirectAPI.py.

◆ set_optical_bench_slit_width()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_optical_bench_slit_width (   self,
  widthMicrons 
)

Writes out the optical bench slit width in microns.

If this function is not supported by the device then an exception will be thrown. If this field in the device is not yet populated then a non-zero(6) code will be returned.

Parameters
[in]widthMicronsThe optical bench width.

Definition at line 1870 of file OceanDirectAPI.py.

◆ set_serial_number()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_serial_number (   self,
  serialNumber 
)

Sets the serial number of the device.

Parameters
[in]serialNumberThe serial number. If value is empty then an exception will be thrown.

Definition at line 3511 of file OceanDirectAPI.py.

◆ set_single_strobe_delay()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_delay (   self,
  delayMicrosecond 
)

Set the amount of time, in microseconds, that should elapse after a starting event before the single strobe should have a rising edge.

Parameters
[in]delayMicrosecondThe delay, in microseconds, that the single strobe should wait before the pulse begins.

Definition at line 2294 of file OceanDirectAPI.py.

◆ set_single_strobe_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_enable (   self,
  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.

Parameters
[in]enableTrue to enable single strobe otherwise use False.

Definition at line 2273 of file OceanDirectAPI.py.

◆ set_single_strobe_width()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_single_strobe_width (   self,
  widthMicrosecond 
)

Set the amount of time, in microseconds, that the single strobe pulse should remain high after it begins.

Parameters
[in]widthMicrosecondThe 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 2310 of file OceanDirectAPI.py.

◆ set_tec_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_tec_enable (   self,
  coolerEnable 
)

Enable or disable the thermo-electric cooler attached to the detector.

If this function is not supported by the device then an exception will be thrown.

Parameters
[in]coolerEnableTrue to enable the cooler, False otherwise.

Definition at line 1595 of file OceanDirectAPI.py.

◆ set_tec_fan_enable()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_tec_fan_enable (   self,
  fanEnable 
)

Enable or disable the thermo-electric cooler fan.

Not all device have fan so running this command may fail. If this function is not supported by the device then an exception will be thrown.

Parameters
[in]fanEnableTrue will enable the fan, False otherwise.

Definition at line 1675 of file OceanDirectAPI.py.

◆ set_tec_setpoint()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_tec_setpoint (   self,
  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.

Parameters
[in]temp_CThe setpoint temperature in celsius.

Definition at line 1579 of file OceanDirectAPI.py.

◆ set_user_string()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_user_string (   self,
  userString 
)

Set a new user string to the device.

The maximum string length is 16. This is the command supported for the newer OBP2.0 enabled devices.

Parameters
[in]userStringThe user string. If value is empty then an exception will be thrown.

Definition at line 3596 of file OceanDirectAPI.py.

◆ set_user_string2()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_user_string2 (   self,
  index,
  userString 
)

Write the user string to the device.

The maximum string length is 16. If the device don't support this command then a non-zero error code will be returned. This command is used by legacy devices.

Parameters
[in]indexThe user string index. If index is less than 0 then an exception will be thrown.
[in]userStringThe user string. If value is empty then an exception will be thrown.

Definition at line 3652 of file OceanDirectAPI.py.

◆ set_wavelength_coeffs()

def Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.set_wavelength_coeffs (   self,
  wavelengthCoeffs 
)

Set the nonlinearity coefficients data into 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.

Parameters
[in]wavelengthCoeffsThe wavelength coefficients data which is an array of float.
Returns
Number of bytes written to the device.

Definition at line 1444 of file OceanDirectAPI.py.

Member Data Documentation

◆ device

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.device

Definition at line 1355 of file OceanDirectAPI.py.

◆ lamp_off

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.lamp_off = c_ubyte(0)
static

Definition at line 1351 of file OceanDirectAPI.py.

◆ lamp_on

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.lamp_on = c_ubyte(1)
static

Definition at line 1350 of file OceanDirectAPI.py.

◆ num_nonlinearity_coeffs

int Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced.num_nonlinearity_coeffs = 8
static

Definition at line 1352 of file OceanDirectAPI.py.