Wasatch.PY
Python application driver for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
wasatch.SpectrometerSettings.SpectrometerSettings Class Reference

Encapsulate a spectrometer's state, including compiled firmware (FPGAOptions), non-volatile configuration (EEPROM) and volatile state (SpectrometerState). More...

Public Member Functions

 __init__ (self, device_id=None, d=None)
 
 augment_from_json_data (self, data)
 
 augment_from_json_file (self, basename=None, pathname=None)
 
 calibrations (self)
 
 default_data_dir (self)
 
 default_detector_setpoint_degC (self)
 
 dump (self)
 
 excitation (self)
 
 full_model (self)
 Originally model names fit within the 16-char EEPROM field of that name.
 
 get_vertical_roi (self)
 
 get_wavecal_coeffs (self)
 
 has_detector (self)
 
 has_excitation (self)
 
 has_marker (self)
 
 has_vertical_roi (self)
 
 is_andor (self)
 
 is_arm (self)
 
 is_gen15 (self)
 
 is_gen2 (self)
 
 is_ids (self)
 
 is_imx (self)
 
 is_imx385 (self)
 
 is_imx392 (self)
 
 is_ingaas (self)
 
 is_micro (self)
 
 is_mml (self)
 
 is_non_raman (self)
 
 is_sig (self)
 
 is_sml (self)
 
 is_spi (self)
 
 is_xs (self)
 
 load_from_dict (self, d)
 Assuming that we've loaded a Measurement from JSON, or received a Measurement-like structure externally via JSON, update whatever we can from it.
 
 pixels (self)
 
 select_calibration (self, calibration)
 
 set_num_connected_devices (self, n)
 
 set_wavecal_coeffs (self, coeffs)
 
 set_wavenumber_correction (self, cm)
 
 supports_feature (self, feature)
 
 to_dict (self)
 
 to_json (self)
 
 update_from_json (self, s)
 
 update_raman_intensity_factors (self)
 
 update_wavecal (self, coeffs=None)
 

Public Attributes

 ble_firmware_version = None
 
 detector_serial_number = None
 
 device_id = device_id
 
bool diagnostic_mode = False
 
 eeprom = EEPROM()
 
 eeprom_backup = None
 
 etalon_correction = None
 
 firmware_requirements = FirmwareRequirements(self)
 
 fpga_firmware_version = None
 
 fpga_options = FPGAOptions()
 
 hardware_info = None
 
 ingaas_correction = None
 
bool lock_wavecal = False
 
 microcontroller_firmware_version = None
 
 microcontroller_serial_number = None
 
int num_connected_devices = 1
 
 raman_intensity_factors = None
 
 state = SpectrometerState()
 
 wavelengths = None
 
 wavenumbers = None
 

Private Attributes

 __dict__
 

Detailed Description

Encapsulate a spectrometer's state, including compiled firmware (FPGAOptions), non-volatile configuration (EEPROM) and volatile state (SpectrometerState).

This class serves two goals:

  1. A picklable object that can be passed between the spectrometer process and the GUI, containing everything the GUI might need to know in convenient form.
  2. A place where the GUI can store settings of MANY different connected spectrometers, and quickly switch between them.

TODO:

Generalize the loading of JSON-based settings, so IDS and Andor can share some common functionality, noting that even X / XM are now going to need this for PixelCalibration.

Constructor & Destructor Documentation

◆ __init__()

wasatch.SpectrometerSettings.SpectrometerSettings.__init__ ( self,
device_id = None,
d = None )
Parameters
device_id(Input) where the spectrometer was found (optional)
d(Input) input dictionary (optional)

Member Function Documentation

◆ augment_from_json_data()

wasatch.SpectrometerSettings.SpectrometerSettings.augment_from_json_data ( self,
data )

◆ augment_from_json_file()

wasatch.SpectrometerSettings.SpectrometerSettings.augment_from_json_file ( self,
basename = None,
pathname = None )
 basename should look like "WP-03173", pathname would be "/path/to/config/WP-03173.json" 

◆ calibrations()

wasatch.SpectrometerSettings.SpectrometerSettings.calibrations ( self)

◆ default_data_dir()

wasatch.SpectrometerSettings.SpectrometerSettings.default_data_dir ( self)
 borrowed from enlighten.common 

◆ default_detector_setpoint_degC()

wasatch.SpectrometerSettings.SpectrometerSettings.default_detector_setpoint_degC ( self)

◆ dump()

wasatch.SpectrometerSettings.SpectrometerSettings.dump ( self)

◆ excitation()

wasatch.SpectrometerSettings.SpectrometerSettings.excitation ( self)

◆ full_model()

wasatch.SpectrometerSettings.SpectrometerSettings.full_model ( self)

Originally model names fit within the 16-char EEPROM field of that name.

Now that we're extending model names to 30 characters, append the value of EEPROM.productConfiguration if non-empty.

◆ get_vertical_roi()

wasatch.SpectrometerSettings.SpectrometerSettings.get_vertical_roi ( self)

◆ get_wavecal_coeffs()

wasatch.SpectrometerSettings.SpectrometerSettings.get_wavecal_coeffs ( self)

◆ has_detector()

wasatch.SpectrometerSettings.SpectrometerSettings.has_detector ( self)

◆ has_excitation()

wasatch.SpectrometerSettings.SpectrometerSettings.has_excitation ( self)

◆ has_marker()

wasatch.SpectrometerSettings.SpectrometerSettings.has_marker ( self)
Todo
add this to EEPROM.feature_mask if we decide to keep the feature

◆ has_vertical_roi()

wasatch.SpectrometerSettings.SpectrometerSettings.has_vertical_roi ( self)

◆ is_andor()

wasatch.SpectrometerSettings.SpectrometerSettings.is_andor ( self)

◆ is_arm()

wasatch.SpectrometerSettings.SpectrometerSettings.is_arm ( self)

◆ is_gen15()

wasatch.SpectrometerSettings.SpectrometerSettings.is_gen15 ( self)

◆ is_gen2()

wasatch.SpectrometerSettings.SpectrometerSettings.is_gen2 ( self)

◆ is_ids()

wasatch.SpectrometerSettings.SpectrometerSettings.is_ids ( self)

◆ is_imx()

wasatch.SpectrometerSettings.SpectrometerSettings.is_imx ( self)

◆ is_imx385()

wasatch.SpectrometerSettings.SpectrometerSettings.is_imx385 ( self)

◆ is_imx392()

wasatch.SpectrometerSettings.SpectrometerSettings.is_imx392 ( self)

◆ is_ingaas()

wasatch.SpectrometerSettings.SpectrometerSettings.is_ingaas ( self)

◆ is_micro()

wasatch.SpectrometerSettings.SpectrometerSettings.is_micro ( self)

◆ is_mml()

wasatch.SpectrometerSettings.SpectrometerSettings.is_mml ( self)

◆ is_non_raman()

wasatch.SpectrometerSettings.SpectrometerSettings.is_non_raman ( self)

◆ is_sig()

wasatch.SpectrometerSettings.SpectrometerSettings.is_sig ( self)

◆ is_sml()

wasatch.SpectrometerSettings.SpectrometerSettings.is_sml ( self)

◆ is_spi()

wasatch.SpectrometerSettings.SpectrometerSettings.is_spi ( self)

◆ is_xs()

wasatch.SpectrometerSettings.SpectrometerSettings.is_xs ( self)

◆ load_from_dict()

wasatch.SpectrometerSettings.SpectrometerSettings.load_from_dict ( self,
d )

Assuming that we've loaded a Measurement from JSON, or received a Measurement-like structure externally via JSON, update whatever we can from it.

◆ pixels()

wasatch.SpectrometerSettings.SpectrometerSettings.pixels ( self)

◆ select_calibration()

wasatch.SpectrometerSettings.SpectrometerSettings.select_calibration ( self,
calibration )

◆ set_num_connected_devices()

wasatch.SpectrometerSettings.SpectrometerSettings.set_num_connected_devices ( self,
n )

◆ set_wavecal_coeffs()

wasatch.SpectrometerSettings.SpectrometerSettings.set_wavecal_coeffs ( self,
coeffs )

◆ set_wavenumber_correction()

wasatch.SpectrometerSettings.SpectrometerSettings.set_wavenumber_correction ( self,
cm )

◆ supports_feature()

wasatch.SpectrometerSettings.SpectrometerSettings.supports_feature ( self,
feature )

◆ to_dict()

wasatch.SpectrometerSettings.SpectrometerSettings.to_dict ( self)

◆ to_json()

wasatch.SpectrometerSettings.SpectrometerSettings.to_json ( self)

◆ update_from_json()

wasatch.SpectrometerSettings.SpectrometerSettings.update_from_json ( self,
s )

◆ update_raman_intensity_factors()

wasatch.SpectrometerSettings.SpectrometerSettings.update_raman_intensity_factors ( self)
@todo Note that WasatchNET.Util.applyRamanCorrection() only generates 
      factors from (roiStart, roiEnd), whereas this function generates
      them for the whole detector. They're only valid within the ROI,
      and should only be applied within the ROI, so this is generating
      more than we need (wasting memory and risking bugs).

◆ update_wavecal()

wasatch.SpectrometerSettings.SpectrometerSettings.update_wavecal ( self,
coeffs = None )

Member Data Documentation

◆ __dict__

wasatch.SpectrometerSettings.SpectrometerSettings.__dict__
private

◆ ble_firmware_version

wasatch.SpectrometerSettings.SpectrometerSettings.ble_firmware_version = None

◆ detector_serial_number

wasatch.SpectrometerSettings.SpectrometerSettings.detector_serial_number = None

◆ device_id

wasatch.SpectrometerSettings.SpectrometerSettings.device_id = device_id

◆ diagnostic_mode

bool wasatch.SpectrometerSettings.SpectrometerSettings.diagnostic_mode = False

◆ eeprom

wasatch.SpectrometerSettings.SpectrometerSettings.eeprom = EEPROM()

◆ eeprom_backup

wasatch.SpectrometerSettings.SpectrometerSettings.eeprom_backup = None

◆ etalon_correction

wasatch.SpectrometerSettings.SpectrometerSettings.etalon_correction = None

◆ firmware_requirements

wasatch.SpectrometerSettings.SpectrometerSettings.firmware_requirements = FirmwareRequirements(self)

◆ fpga_firmware_version

wasatch.SpectrometerSettings.SpectrometerSettings.fpga_firmware_version = None

◆ fpga_options

wasatch.SpectrometerSettings.SpectrometerSettings.fpga_options = FPGAOptions()

◆ hardware_info

wasatch.SpectrometerSettings.SpectrometerSettings.hardware_info = None

◆ ingaas_correction

wasatch.SpectrometerSettings.SpectrometerSettings.ingaas_correction = None

◆ lock_wavecal

bool wasatch.SpectrometerSettings.SpectrometerSettings.lock_wavecal = False

◆ microcontroller_firmware_version

wasatch.SpectrometerSettings.SpectrometerSettings.microcontroller_firmware_version = None

◆ microcontroller_serial_number

wasatch.SpectrometerSettings.SpectrometerSettings.microcontroller_serial_number = None

◆ num_connected_devices

int wasatch.SpectrometerSettings.SpectrometerSettings.num_connected_devices = 1

◆ raman_intensity_factors

wasatch.SpectrometerSettings.SpectrometerSettings.raman_intensity_factors = None

◆ state

wasatch.SpectrometerSettings.SpectrometerSettings.state = SpectrometerState()

◆ wavelengths

wasatch.SpectrometerSettings.SpectrometerSettings.wavelengths = None

◆ wavenumbers

wasatch.SpectrometerSettings.SpectrometerSettings.wavenumbers = None

The documentation for this class was generated from the following file: