OceanDirectPython 3.1.3
OceanDirect Python API
Python.oceandirect.OceanDirectAPI.Spectrometer Class Reference

Class that models the individual spectrometer. More...

Classes

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

Public Member Functions

 __init__ (self, int dev_id, oceandirect)
 
str get_serial_number (self)
 Read the device serial number.
 
int get_device_type (self)
 Read the device type.
 
str get_model (self)
 Read the correct spectrometer model name assigned.
 
str decode_error (self, int errno, str caller)
 Decodes the error string returned from device calls.
 
None open_device (self)
 Open the current device associated with this spectrometer object.
 
None close_device (self)
 Detaches the device to free it up for other users.
 
None use_nonlinearity (self, bool nonlinearity_flag)
 Determine if nonlinearity correction should be used in calculations.
 
None set_scans_to_average (self, int newScanToAverage)
 Sets the number of spectra to average.
 
int get_scans_to_average (self)
 Gets the number of spectra to average.
 
None set_boxcar_width (self, int newBoxcarWidth)
 Sets the boxcar width to average the spectral data.
 
int get_boxcar_width (self)
 Read the current boxcar width setting.
 
int get_max_intensity (self)
 Returns the maximum pixel value the detector can read.
 
list[float] get_formatted_spectrum (self)
 Return a formatted spectrum.
 
int get_formatted_spectrum_length (self)
 Return the formatted spectra length.
 
list[float] get_wavelengths (self)
 This computes the wavelengths for the spectrometer and fills in the provided array (up to the given length) with those values.
 
int get_minimum_integration_time (self)
 Returns the minimum allowable integration time on the device.
 
int get_maximum_integration_time (self)
 Returns the maximum allowable integration time on the device.
 
int get_minimum_averaging_integration_time (self)
 This function returns the smallest integration time setting, in microseconds, that is valid for the spectrometer.
 
None set_integration_time (self, int int_time)
 Sets the integration time on the device.
 
int get_integration_time (self)
 Returns the current integration time on the device.
 
int get_integration_time_increment (self)
 Returns the integration time increment on the device.
 
None set_trigger_mode (self, int mode)
 Set the device trigger mode.
 
None get_trigger_mode (self)
 Returns the current trigger mode from the device.
 
tuple[int, float] get_index_at_wavelength (self, float wavelength)
 Given an approximate wavelength, finds the closest wavelength and returns the index (pixel number) of that wavelength, and the exact wavelength as an ordered pair.
 
tuple[list[int], list[float]] get_indices_at_wavelengths (self, list[float] wavelengths)
 Given a list of approximate wavelengths, finds the closest wavelengths and returns the indices (pixel numbers) of those wavelengths, and the exact wavelength as an ordered pair of lists.
 
tuple[list[int], list[float]] get_indices_at_wavelength_range (self, float lo, float hi, int length)
 Given a list of approximate wavelengths, finds the closest wavelengths and returns the indices (pixel numbers) of those wavelengths, and the exact wavelength as an ordered pair of lists.
 
int get_number_electric_dark_pixels (self)
 This returns the number of pixels that are electrically active but optically masked (a.k.a.
 
list[int] get_electric_dark_pixel_indices (self)
 This returns array (up to the given length) with the indices of the pixels that are electrically active but optically masked (a.k.a.
 
None details (self)
 Prints the defined set of details about the device.
 
bool is_feature_id_enabled (self, FeatureID featureID)
 Check if the given feature ID is supported by the device or not.
 
None set_acquisition_delay (self, int delayMicrosecond)
 Set the acquisition delay in microseconds.
 
int get_acquisition_delay (self)
 Get the acquisition delay in microseconds.
 
int get_acquisition_delay_increment (self)
 Get the allowed step size for the acquisition delay in microseconds.
 
int get_acquisition_delay_maximum (self)
 Get the maximum allowed acquisition delay in microseconds.
 
int get_acquisition_delay_minimum (self)
 Get the minimum allowed acquisition delay in microseconds.
 
None set_stored_dark_spectrum (self, list[float] darkSpectrum)
 Store a dark spectrum for use in subsequent corrections i.e.
 
list[float] get_stored_dark_spectrum (self)
 Retrieve a previously stored dark spectrum for use in subsequent corrections i.e.
 
list[float] get_dark_corrected_spectrum1 (self, list[float] darkSpectrum)
 Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum.
 
list[float] dark_correct_spectrum1 (self, list[float] illuminatedSpectrum)
 Dark correct a previously acquired illuminated spectrum and using a stored dark spectrum.
 
list[float] get_dark_corrected_spectrum2 (self)
 Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum.
 
list[float] dark_correct_spectrum2 (self, list[float] darkSpectrum, list[float] illuminatedSpectrum)
 Dark correct a previously acquired illuminated spectrum and using a previously acquired dark spectrum.
 
list[float] get_nonlinearity_corrected_spectrum1 (self, 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.
 
list[float] nonlinearity_correct_spectrum1 (self, list[float] illuminatedSpectrum)
 Nonlinearity correct a previously acquired illuminated spectrum using a stored dark spectrum.
 
list[float] get_nonlinearity_corrected_spectrum2 (self)
 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.
 
list[float] nonlinearity_correct_spectrum2 (self, list[float] darkSpectrum, list[float] illuminatedSpectrum)
 Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum.
 
list[float] boxcar_correct_spectrum (self, list[float] illuminatedSpectrum, int boxcarWidth)
 Apply a boxcar correction on the given illuminated spectrum.
 
None set_electric_dark_correction_usage (self, bool isEnabled)
 Enable or disable an electric dark correction.
 
bool get_electric_dark_correction_usage (self)
 Return electric dark correction usage.
 
None set_nonlinearity_correction_usage (self, bool isEnabled)
 Enable or disable nonlinearity correction.
 
bool get_nonlinearity_correction_usage (self)
 Return nonlinearity correction usage.
 

Public Attributes

 device_id = dev_id
 
str serial_number = None
 
 model = None
 
 model_name = None
 
 integration_time = None
 
 integration_min = None
 
int integration_max = None
 
int pixel_count_formatted = 0
 
 num_electric_dark_pixels = None
 
 electric_dark_pixels = list()
 
str status = 'closed'
 
 wavelengths = None
 
 oceandirect = oceandirect
 
 Advanced = self.Advanced(device = self)
 
bool apply_nonlinearity = True
 
int scans_to_avg = 1
 
bool boxcar_hw = False
 
tuple status = (c_long * 1)(0)
 
int num_electric_dark_pixels = 0:
 

Detailed Description

Class that models the individual spectrometer.

Should be created by OceanDirectAPI instance. This has an inner class called "Advanced" that contains functions to access other features of the device.

Definition at line 459 of file OceanDirectAPI.py.

Constructor & Destructor Documentation

◆ __init__()

Python.oceandirect.OceanDirectAPI.Spectrometer.__init__ ( self,
int dev_id,
oceandirect )

Definition at line 465 of file OceanDirectAPI.py.

Member Function Documentation

◆ boxcar_correct_spectrum()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.boxcar_correct_spectrum ( self,
list[float] illuminatedSpectrum,
int boxcarWidth )

Apply a boxcar correction on the given illuminated spectrum.

Parameters
illuminatedSpectrumThe spectrum that will be boxcar corrected.
boxcarWidthThe boxcar width.
Returns
The boxcar corrected spectrum.

Definition at line 1278 of file OceanDirectAPI.py.

◆ close_device()

None Python.oceandirect.OceanDirectAPI.Spectrometer.close_device ( self)

Detaches the device to free it up for other users.

This function must be called when you're done using the device.

See also
open_device()

Definition at line 579 of file OceanDirectAPI.py.

◆ dark_correct_spectrum1()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.dark_correct_spectrum1 ( self,
list[float] illuminatedSpectrum )

Dark correct a previously acquired illuminated spectrum and using a stored dark spectrum.

See also
setStoredDarkSpectrum
Parameters
illuminatedSpectrumThe buffer that contains the illuminated spectrum to be corrected.
Returns
The dark corrected spectrum.

Definition at line 1104 of file OceanDirectAPI.py.

◆ dark_correct_spectrum2()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.dark_correct_spectrum2 ( self,
list[float] darkSpectrum,
list[float] illuminatedSpectrum )

Dark correct a previously acquired illuminated spectrum and using a previously acquired dark spectrum.

Parameters
darkSpectrumThe buffer that contains the dark spectrum to be used for the dark correction.
illuminatedSpectrumThe buffer that contains the illuminated spectrum to be corrected.
Returns
The dark corrected spectrum.

Definition at line 1144 of file OceanDirectAPI.py.

◆ decode_error()

str Python.oceandirect.OceanDirectAPI.Spectrometer.decode_error ( self,
int errno,
str caller )

Decodes the error string returned from device calls.

Parameters
errnoThe error code.
callerThe method name that calls this function.
Returns
The string description of the error code.

Definition at line 531 of file OceanDirectAPI.py.

◆ details()

None Python.oceandirect.OceanDirectAPI.Spectrometer.details ( self)

Prints the defined set of details about the device.

Definition at line 945 of file OceanDirectAPI.py.

◆ get_acquisition_delay()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_acquisition_delay ( self)

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.

See also
set_acquisition_delay()
Returns
The acquisition delay in microseconds.

Definition at line 983 of file OceanDirectAPI.py.

◆ get_acquisition_delay_increment()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_acquisition_delay_increment ( self)

Get the allowed step size for the acquisition delay in microseconds.

Returns
The acquisition delay step size in microseconds.

Definition at line 1003 of file OceanDirectAPI.py.

◆ get_acquisition_delay_maximum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_acquisition_delay_maximum ( self)

Get the maximum allowed acquisition delay in microseconds.

Returns
The maximum acquisition delay in microseconds.

Definition at line 1016 of file OceanDirectAPI.py.

◆ get_acquisition_delay_minimum()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_acquisition_delay_minimum ( self)

Get the minimum allowed acquisition delay in microseconds.

Returns
The minimum acquisition delay in microseconds.

Definition at line 1029 of file OceanDirectAPI.py.

◆ get_boxcar_width()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_boxcar_width ( self)

Read the current boxcar width setting.

See also
set_boxcar_width()
Returns
The boxcar width.

Definition at line 643 of file OceanDirectAPI.py.

◆ get_dark_corrected_spectrum1()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_dark_corrected_spectrum1 ( self,
list[float] darkSpectrum )

Acquire a spectrum and use the supplied dark spectrum to perform a dark correction then return the dark corrected spectrum.

Parameters
darkSpectrumThe buffer that contains the dark spectrum to be used for the dark correction.
Returns
The dark corrected spectrum.

Definition at line 1079 of file OceanDirectAPI.py.

◆ get_dark_corrected_spectrum2()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_dark_corrected_spectrum2 ( self)

Acquire a spectrum and use the previously stored dark spectrum to perform a dark correction then return the dark corrected spectrum.

See also
setStoredDarkSpectrum.
Returns
The dark corrected spectrum.

Definition at line 1130 of file OceanDirectAPI.py.

◆ get_device_type()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_device_type ( self)

Read the device type.

Returns
The device type.

Definition at line 501 of file OceanDirectAPI.py.

◆ get_electric_dark_correction_usage()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.get_electric_dark_correction_usage ( self)

Return electric dark correction usage.

See also
set_electric_dark_correction_usage()
Returns
True if electric dark connection is applied otherwise it's False.

Definition at line 1322 of file OceanDirectAPI.py.

◆ get_electric_dark_pixel_indices()

list[int] Python.oceandirect.OceanDirectAPI.Spectrometer.get_electric_dark_pixel_indices ( self)

This returns array (up to the given length) with the indices of the 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.

Returns
A list of pixels that are electric dark on that spectrometer.

Definition at line 926 of file OceanDirectAPI.py.

◆ get_formatted_spectrum()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_formatted_spectrum ( self)

Return a formatted spectrum.

Returns
The formatted spectrum.

Definition at line 671 of file OceanDirectAPI.py.

◆ get_formatted_spectrum_length()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_formatted_spectrum_length ( self)

Return the formatted spectra length.

Returns
The spectra length.

Definition at line 688 of file OceanDirectAPI.py.

◆ get_index_at_wavelength()

tuple[int, float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_index_at_wavelength ( self,
float wavelength )

Given an approximate wavelength, finds the closest wavelength and returns the index (pixel number) of that wavelength, and the exact wavelength as an ordered pair.

Parameters
wavelengthA double value containing a best guess or approximate (this should be within bounds of the entire wavelength array or an error is generated).
Returns
A pair value (tuple) of index (pixel) and wavelength value.

Definition at line 845 of file OceanDirectAPI.py.

◆ get_indices_at_wavelength_range()

tuple[list[int], list[float]] Python.oceandirect.OceanDirectAPI.Spectrometer.get_indices_at_wavelength_range ( self,
float lo,
float hi,
int length )

Given a list of approximate wavelengths, finds the closest wavelengths and returns the indices (pixel numbers) of those wavelengths, and the exact wavelength as an ordered pair of lists.

Parameters
loWavelength lower limit.
hiWavelength upper limit.
lengthThe number of wavelengths to return.
Returns
A pair value (tuple) of list(indices) and list(actual_wavelengths)

Definition at line 884 of file OceanDirectAPI.py.

◆ get_indices_at_wavelengths()

tuple[list[int], list[float]] Python.oceandirect.OceanDirectAPI.Spectrometer.get_indices_at_wavelengths ( self,
list[float] wavelengths )

Given a list of approximate wavelengths, finds the closest wavelengths and returns the indices (pixel numbers) of those wavelengths, and the exact wavelength as an ordered pair of lists.

Parameters
wavelengthsList of approximate wavelengths.
Returns
A pair value (tuple) of list(indices) and list(actual_wavelengths).

Definition at line 862 of file OceanDirectAPI.py.

◆ get_integration_time()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_integration_time ( self)

Returns the current integration time on the device.

See also
set_integration_time()
Returns
The integration time in microsecond.

Definition at line 782 of file OceanDirectAPI.py.

◆ get_integration_time_increment()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_integration_time_increment ( self)

Returns the integration time increment on the device.

Returns
The integration time increment in microsecond.

Definition at line 802 of file OceanDirectAPI.py.

◆ get_max_intensity()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_max_intensity ( self)

Returns the maximum pixel value the detector can read.

Returns
The maximum intensity.

Definition at line 657 of file OceanDirectAPI.py.

◆ get_maximum_integration_time()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_maximum_integration_time ( self)

Returns the maximum allowable integration time on the device.

Returns
The maximum integration time.

Definition at line 727 of file OceanDirectAPI.py.

◆ get_minimum_averaging_integration_time()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_minimum_averaging_integration_time ( self)

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.

Returns
The minimum averaging integration time.

Definition at line 747 of file OceanDirectAPI.py.

◆ get_minimum_integration_time()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_minimum_integration_time ( self)

Returns the minimum allowable integration time on the device.

Returns
The minimum integration time.

Definition at line 713 of file OceanDirectAPI.py.

◆ get_model()

str Python.oceandirect.OceanDirectAPI.Spectrometer.get_model ( self)

Read the correct spectrometer model name assigned.

Returns
The device model name.

Definition at line 515 of file OceanDirectAPI.py.

◆ get_nonlinearity_corrected_spectrum1()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_nonlinearity_corrected_spectrum1 ( self,
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.

Parameters
darkSpectrumThe buffer that contains the dark spectrum to be used for the dark correction.
Returns
The nonlinearity corrected spectrum.

Definition at line 1176 of file OceanDirectAPI.py.

◆ get_nonlinearity_corrected_spectrum2()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_nonlinearity_corrected_spectrum2 ( self)

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.

See also
setStoredDarkSpectrum.
Returns
The nonlinearity corrected spectrum.

Definition at line 1229 of file OceanDirectAPI.py.

◆ get_nonlinearity_correction_usage()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.get_nonlinearity_correction_usage ( self)

Return nonlinearity correction usage.

See also
set_nonlinearity_correction_usage()
Returns
True if nonlinearity connection is applied otherwise it's False.

Definition at line 1349 of file OceanDirectAPI.py.

◆ get_number_electric_dark_pixels()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_number_electric_dark_pixels ( self)

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.

Returns
The number of electric dark pixels on the spectrometer.

Definition at line 911 of file OceanDirectAPI.py.

◆ get_scans_to_average()

int Python.oceandirect.OceanDirectAPI.Spectrometer.get_scans_to_average ( self)

Gets the number of spectra to average.

See also
set_scans_to_average()
Returns
The number of spectra to average.

Definition at line 616 of file OceanDirectAPI.py.

◆ get_serial_number()

str Python.oceandirect.OceanDirectAPI.Spectrometer.get_serial_number ( self)

Read the device serial number.

Returns
The serial number.

Definition at line 485 of file OceanDirectAPI.py.

◆ get_stored_dark_spectrum()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_stored_dark_spectrum ( self)

Retrieve a previously stored dark spectrum for use in subsequent corrections i.e.

dark correction and nonlinearity correction.

See also
setStoredDarkSpectrum.
Returns
The dark spectrum.

Definition at line 1065 of file OceanDirectAPI.py.

◆ get_trigger_mode()

None Python.oceandirect.OceanDirectAPI.Spectrometer.get_trigger_mode ( self)

Returns the current trigger mode from the device.

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

See also
set_trigger_mode()
Returns
The trigger mode.

Definition at line 830 of file OceanDirectAPI.py.

◆ get_wavelengths()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.get_wavelengths ( self)

This computes the wavelengths for the spectrometer and fills in the provided array (up to the given length) with those values.

Returns
The wavelength values for the device in a python list.

Definition at line 695 of file OceanDirectAPI.py.

◆ is_feature_id_enabled()

bool Python.oceandirect.OceanDirectAPI.Spectrometer.is_feature_id_enabled ( self,
FeatureID featureID )

Check if the given feature ID is supported by the device or not.

Parameters
featureIDAn id from FeatureID enum.
Returns
True if the feature is supported otherwise it's false.

Definition at line 954 of file OceanDirectAPI.py.

◆ nonlinearity_correct_spectrum1()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.nonlinearity_correct_spectrum1 ( self,
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.

See also
setStoredDarkSpectrum
Parameters
illuminatedSpectrumThe buffer that contains the illuminated spectrum to be corrected.
Returns
The nonlinearity corrected spectrum.

Definition at line 1202 of file OceanDirectAPI.py.

◆ nonlinearity_correct_spectrum2()

list[float] Python.oceandirect.OceanDirectAPI.Spectrometer.nonlinearity_correct_spectrum2 ( self,
list[float] darkSpectrum,
list[float] illuminatedSpectrum )

Nonlinearity correct a previously acquired illuminated spectrum after dark correction using a previously acquired dark spectrum.

Parameters
darkSpectrumThe buffer that contains the dark spectrum to be used prior to the nonlinearity correction.
illuminatedSpectrumThe buffer that contains the illuminated spectrum to be corrected.
Returns
The nonlinearity corrected spectrum.

Definition at line 1245 of file OceanDirectAPI.py.

◆ open_device()

None Python.oceandirect.OceanDirectAPI.Spectrometer.open_device ( self)

Open the current device associated with this spectrometer object.

See also
close_device()

Definition at line 544 of file OceanDirectAPI.py.

◆ set_acquisition_delay()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_acquisition_delay ( self,
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.

See also
get_acquisition_delay()
Parameters
delayMicrosecondThe new delay to use in microseconds.

Definition at line 968 of file OceanDirectAPI.py.

◆ set_boxcar_width()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_boxcar_width ( self,
int newBoxcarWidth )

Sets the boxcar width to average the spectral data.

See also
get_boxcar_width()
Parameters
newBoxcarWidthThe boxcar width.

Definition at line 630 of file OceanDirectAPI.py.

◆ set_electric_dark_correction_usage()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_electric_dark_correction_usage ( self,
bool isEnabled )

Enable or disable an electric dark correction.

See also
get_electric_dark_correction_usage()
Parameters
isEnabledTrue to enable electric dark correction otherwise it's False.

Definition at line 1309 of file OceanDirectAPI.py.

◆ set_integration_time()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_integration_time ( self,
int int_time )

Sets the integration time on the device.

This should be verified to be within range prior to calling this function.

See also
get_integration_time()
Parameters
int_timeThe new integration time in microseconds. See device manual for supported integration increment.

Definition at line 767 of file OceanDirectAPI.py.

◆ set_nonlinearity_correction_usage()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_nonlinearity_correction_usage ( self,
bool isEnabled )

Enable or disable nonlinearity correction.

See also
get_nonlinearity_correction_usage()
Parameters
isEnabledTrue to enable nonlinearity correction otherwise it's False.

Definition at line 1336 of file OceanDirectAPI.py.

◆ set_scans_to_average()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_scans_to_average ( self,
int newScanToAverage )

Sets the number of spectra to average.

See also
get_scans_to_average()
Parameters
newScanToAverageThe number of spectra to average.

Definition at line 603 of file OceanDirectAPI.py.

◆ set_stored_dark_spectrum()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_stored_dark_spectrum ( self,
list[float] darkSpectrum )

Store a dark spectrum for use in subsequent corrections i.e.

dark correction and nonlinearity correction.

See also
getStoredDarkSpectrum.
Parameters
darkSpectrumThe buffer that contains the dark spectrum to be stored.

Definition at line 1042 of file OceanDirectAPI.py.

◆ set_trigger_mode()

None Python.oceandirect.OceanDirectAPI.Spectrometer.set_trigger_mode ( self,
int mode )

Set the device trigger mode.

See also
get_trigger_mode()
Parameters
modeTrigger mode. See device manual for the supported trigger mode.

Definition at line 817 of file OceanDirectAPI.py.

◆ use_nonlinearity()

None Python.oceandirect.OceanDirectAPI.Spectrometer.use_nonlinearity ( self,
bool nonlinearity_flag )

Determine if nonlinearity correction should be used in calculations.

Typically should be set to true.

Parameters
nonlinearity_flagTrue to enable nonlinearity correction otherwise it's False.

Definition at line 592 of file OceanDirectAPI.py.

Member Data Documentation

◆ Advanced

Python.oceandirect.OceanDirectAPI.Spectrometer.Advanced = self.Advanced(device = self)

Definition at line 479 of file OceanDirectAPI.py.

◆ apply_nonlinearity

bool Python.oceandirect.OceanDirectAPI.Spectrometer.apply_nonlinearity = True

Definition at line 480 of file OceanDirectAPI.py.

◆ boxcar_hw

bool Python.oceandirect.OceanDirectAPI.Spectrometer.boxcar_hw = False

Definition at line 482 of file OceanDirectAPI.py.

◆ device_id

Python.oceandirect.OceanDirectAPI.Spectrometer.device_id = dev_id

Definition at line 466 of file OceanDirectAPI.py.

◆ electric_dark_pixels

Python.oceandirect.OceanDirectAPI.Spectrometer.electric_dark_pixels = list()

Definition at line 475 of file OceanDirectAPI.py.

◆ integration_max

int Python.oceandirect.OceanDirectAPI.Spectrometer.integration_max = None

Definition at line 472 of file OceanDirectAPI.py.

◆ integration_min

Python.oceandirect.OceanDirectAPI.Spectrometer.integration_min = None

Definition at line 471 of file OceanDirectAPI.py.

◆ integration_time

Python.oceandirect.OceanDirectAPI.Spectrometer.integration_time = None

Definition at line 470 of file OceanDirectAPI.py.

◆ model

Python.oceandirect.OceanDirectAPI.Spectrometer.model = None

Definition at line 468 of file OceanDirectAPI.py.

◆ model_name

Python.oceandirect.OceanDirectAPI.Spectrometer.model_name = None

Definition at line 469 of file OceanDirectAPI.py.

◆ num_electric_dark_pixels [1/2]

Python.oceandirect.OceanDirectAPI.Spectrometer.num_electric_dark_pixels = None

Definition at line 474 of file OceanDirectAPI.py.

◆ num_electric_dark_pixels [2/2]

int Python.oceandirect.OceanDirectAPI.Spectrometer.num_electric_dark_pixels = 0:

Definition at line 919 of file OceanDirectAPI.py.

◆ oceandirect

Python.oceandirect.OceanDirectAPI.Spectrometer.oceandirect = oceandirect

Definition at line 478 of file OceanDirectAPI.py.

◆ pixel_count_formatted

int Python.oceandirect.OceanDirectAPI.Spectrometer.pixel_count_formatted = 0

Definition at line 473 of file OceanDirectAPI.py.

◆ scans_to_avg

int Python.oceandirect.OceanDirectAPI.Spectrometer.scans_to_avg = 1

Definition at line 481 of file OceanDirectAPI.py.

◆ serial_number

str Python.oceandirect.OceanDirectAPI.Spectrometer.serial_number = None

Definition at line 467 of file OceanDirectAPI.py.

◆ status [1/2]

Python.oceandirect.OceanDirectAPI.Spectrometer.status = 'closed'

Definition at line 476 of file OceanDirectAPI.py.

◆ status [2/2]

tuple Python.oceandirect.OceanDirectAPI.Spectrometer.status = (c_long * 1)(0)

Definition at line 558 of file OceanDirectAPI.py.

◆ wavelengths

Python.oceandirect.OceanDirectAPI.Spectrometer.wavelengths = None

Definition at line 477 of file OceanDirectAPI.py.