PythonOceanDirect  2.4.0
OceanDirect Python API
Classes | Public Member Functions | Public Attributes | List of all members
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

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

Public Attributes

 device_id
 
 serial_number
 
 model
 
 model_name
 
 integration_time
 
 integration_min
 
 integration_max
 
 pixel_count_formatted
 
 num_electric_dark_pixels
 
 electric_dark_pixels
 
 status
 
 wavelengths
 
 oceandirect
 
 Advanced
 
 apply_nonlinearity
 
 scans_to_avg
 
 boxcar_hw
 

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 449 of file OceanDirectAPI.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 455 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
illuminatedSpectrum[in]the spectrum that will be boxcar corrected.
boxcarWidth[in]the 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.

Definition at line 562 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
illuminatedSpectrum[in]the buffer that contains the illuminated spectrum to be corrected.
Returns
The dark corrected spectrum.

Definition at line 1099 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
darkSpectrum[in]the buffer that contains the dark spectrum to be used for the dark correction.
illuminatedSpectrum[in]the buffer that contains the illuminated spectrum to be corrected.
Returns
The dark corrected spectrum.

Definition at line 1141 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
[in]errnoThe error code.
[in]callerThe method name that calls this function.
Returns
The string description of the error code.

Definition at line 525 of file OceanDirectAPI.py.

◆ details()

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

Prints the defined set of details about the device.

Definition at line 932 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.

Returns
The acquisition delay in microseconds.

Definition at line 972 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 992 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 1006 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 1020 of file OceanDirectAPI.py.

◆ get_boxcar_width()

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

Read the current boxcar width setting.

Returns
The boxcar width.

Definition at line 628 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
darkSpectrum[in]the buffer that contains the dark spectrum to be used for the dark correction.
Returns
The dark corrected spectrum.

Definition at line 1073 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 1126 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 492 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.

Returns
True if electric dark connection is applied otherwise it's False.

Definition at line 1320 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 911 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 658 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 676 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
[in]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 826 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
[in]loWavelength lower limit.
[in]hiWavelength upper limit.
[in]lengthThe number of wavelengths to return.
Returns
A pair value (tuple) of list(indices) and list(actual_wavelengths)

Definition at line 866 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
[in]wavelengthsList of approximate wavelengths.
Returns
A pair value (tuple) of list(indices) and list(actual_wavelengths).

Definition at line 844 of file OceanDirectAPI.py.

◆ get_integration_time()

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

Returns the current integration time on the device.

Returns
The integration time in microsecond.

Definition at line 767 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 782 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 643 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 718 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 733 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 703 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 508 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
darkSpectrum[in]the buffer that contains the dark spectrum to be used for the dark correction.
Returns
The nonlinearity corrected spectrum.

Definition at line 1174 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 1228 of file OceanDirectAPI.py.

◆ get_nonlinearity_correction_usage()

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

Return nonlinearity correction usage.

Returns
True if nonlinearity connection is applied otherwise it's False.

Definition at line 1348 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 894 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.

Returns
The number of spectra to average.

Definition at line 600 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 475 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 1058 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.

Returns
The trigger mode.

Definition at line 810 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 684 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
[in]featureIDAn id from FeatureID enum.
Returns
True if the feature is supported otherwise it's false.

Definition at line 942 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
illuminatedSpectrum[in]the buffer that contains the illuminated spectrum to be corrected.
Returns
The nonlinearity corrected spectrum.

Definition at line 1201 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
darkSpectrum[in]the buffer that contains the dark spectrum to be used prior to the nonlinearity correction.
illuminatedSpectrum[in]the 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.

Definition at line 539 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.

Parameters
[in]delayMicrosecondThe new delay to use in microseconds.

Definition at line 957 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.

Parameters
[in]newBoxcarWidthThe boxcar width.

Definition at line 615 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.

Parameters
[in]isEnabledTrue to enable electric dark correction otherwise it's False.

Definition at line 1307 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.

Parameters
[in]int_timeThe new integration time in microseconds. See device manual for supported integration increment.

Definition at line 752 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.

Parameters
[in]isEnabledTrue to enable nonlinearity correction otherwise it's False.

Definition at line 1335 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.

Parameters
[in]newScanToAverageThe number of spectra to average.

Definition at line 587 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
darkSpectrum[in]the buffer that contains the dark spectrum to be stored.

Definition at line 1034 of file OceanDirectAPI.py.

◆ set_trigger_mode()

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

Set the device trigger mode.

Parameters
[in]modeTrigger mode. See device manual for the supported trigger mode.

Definition at line 797 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
[in]nonlinearity_flagTrue to enable nonlinearity correction otherwise it's False.

Definition at line 575 of file OceanDirectAPI.py.

Member Data Documentation

◆ Advanced

Definition at line 469 of file OceanDirectAPI.py.

◆ apply_nonlinearity

Python.oceandirect.OceanDirectAPI.Spectrometer.apply_nonlinearity

Definition at line 470 of file OceanDirectAPI.py.

◆ boxcar_hw

Python.oceandirect.OceanDirectAPI.Spectrometer.boxcar_hw

Definition at line 472 of file OceanDirectAPI.py.

◆ device_id

Python.oceandirect.OceanDirectAPI.Spectrometer.device_id

Definition at line 456 of file OceanDirectAPI.py.

◆ electric_dark_pixels

Python.oceandirect.OceanDirectAPI.Spectrometer.electric_dark_pixels

Definition at line 465 of file OceanDirectAPI.py.

◆ integration_max

Python.oceandirect.OceanDirectAPI.Spectrometer.integration_max

Definition at line 462 of file OceanDirectAPI.py.

◆ integration_min

Python.oceandirect.OceanDirectAPI.Spectrometer.integration_min

Definition at line 461 of file OceanDirectAPI.py.

◆ integration_time

Python.oceandirect.OceanDirectAPI.Spectrometer.integration_time

Definition at line 460 of file OceanDirectAPI.py.

◆ model

Python.oceandirect.OceanDirectAPI.Spectrometer.model

Definition at line 458 of file OceanDirectAPI.py.

◆ model_name

Python.oceandirect.OceanDirectAPI.Spectrometer.model_name

Definition at line 459 of file OceanDirectAPI.py.

◆ num_electric_dark_pixels

Python.oceandirect.OceanDirectAPI.Spectrometer.num_electric_dark_pixels

Definition at line 464 of file OceanDirectAPI.py.

◆ oceandirect

Python.oceandirect.OceanDirectAPI.Spectrometer.oceandirect

Definition at line 468 of file OceanDirectAPI.py.

◆ pixel_count_formatted

Python.oceandirect.OceanDirectAPI.Spectrometer.pixel_count_formatted

Definition at line 463 of file OceanDirectAPI.py.

◆ scans_to_avg

Python.oceandirect.OceanDirectAPI.Spectrometer.scans_to_avg

Definition at line 471 of file OceanDirectAPI.py.

◆ serial_number

Python.oceandirect.OceanDirectAPI.Spectrometer.serial_number

Definition at line 457 of file OceanDirectAPI.py.

◆ status

Python.oceandirect.OceanDirectAPI.Spectrometer.status

Definition at line 466 of file OceanDirectAPI.py.

◆ wavelengths

Python.oceandirect.OceanDirectAPI.Spectrometer.wavelengths

Definition at line 467 of file OceanDirectAPI.py.