ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
wasatch.simulation_protocol.SimulateMaterial Class Reference

Read recorded spectrum from file, respond with noise on the baseline read from file. More...

Public Member Functions

 __init__ (self)
 
 disconnect (self)
 Placeholder to log disconnect event.
 
 get_ccd_gain (self)
 
 get_detector_temperature_degC (self, raw=0)
 Return randomized laser and detector temperature simulation within range.
 
 get_detector_temperature_raw (self)
 Simulate a 12-bit AD.
 
 get_fpga_revision (self)
 
 get_integration_time_ms (self)
 
 get_laser_temperature_degC (self, raw=0)
 Return randomized laser and ccd temperature simulation within range.
 
 get_laser_temperature_raw (self)
 
 get_line (self)
 Wrap the read data simulation in a sleep-wait to ensure fidelity for longer exposure integration times.
 
 get_model_number (self)
 
 get_sensor_line_length (self)
 
 get_serial_number (self)
 
 get_standard_software_code (self)
 
 load_raw_data (self, filename=None)
 Apparently MS windows keeps some portion of the dictreader in place that prevents a clean exit in multiprocessing applications.
 
 read (self)
 Return the spectrum read from file.
 
 set_degC_to_dac_coeffs (self, coeffs)
 Temporary solution for modifying the CCD TEC setpoint calibration coefficients.
 
 write_setting (self, record)
 Perform the specified setting such as simulating a laser enable, changing the integration time, turning the cooler on etc.
 

Public Attributes

list bad_pixels = []
 
int ccd_adc_setpoint = 2047
 
float ccd_gain = 1.9
 
float degC_to_dac_coeff_0 = self.original_degC_to_dac_coeff_0
 
float degC_to_dac_coeff_1 = self.original_degC_to_dac_coeff_1
 
float degC_to_dac_coeff_2 = self.original_degC_to_dac_coeff_2
 
int detector_tec_enable = 0
 
float detector_tec_setpoint_degC = 15.0
 
str fpga_revision = "SIM.022-007"
 
 initial_data = self.startup_noise
 
int integration = self.min_integration
 
int ipa_data = numpy.asarray(self.load_raw_data()[0])
 
str laser_status = "disable"
 
int max_integration = 10000
 
int min_integration = 1
 
str model = "785"
 
int noise_level = self.max_integration - self.integration
 
int noise_margin = 100
 
float original_degC_to_dac_coeff_0 = 3566.62
 
float original_degC_to_dac_coeff_1 = -143.543
 
float original_degC_to_dac_coeff_2 = -0.324723
 
int pixels = 1024
 
str serial_number = "SIM-512"
 
int signal_modifier = self.integration
 
str software_code = "SIM.0.0.1"
 
 startup_noise = startup_noise
 

Detailed Description

Read recorded spectrum from file, respond with noise on the baseline read from file.

Default spectrum is pure noise from numpy. When the laser is on, it's the IPA csv entry (0). This is designed to simulate a vial of IPA in a holder. Changing the integration time scales just the noise on the spectrum. A integration time of 1 has 1-10k counts of noise. An integration time of 10k has 0-1 counts of noise.

Constructor & Destructor Documentation

◆ __init__()

wasatch.simulation_protocol.SimulateMaterial.__init__ ( self)

Member Function Documentation

◆ disconnect()

wasatch.simulation_protocol.SimulateMaterial.disconnect ( self)

Placeholder to log disconnect event.

◆ get_ccd_gain()

wasatch.simulation_protocol.SimulateMaterial.get_ccd_gain ( self)

◆ get_detector_temperature_degC()

wasatch.simulation_protocol.SimulateMaterial.get_detector_temperature_degC ( self,
raw = 0 )

Return randomized laser and detector temperature simulation within range.

◆ get_detector_temperature_raw()

wasatch.simulation_protocol.SimulateMaterial.get_detector_temperature_raw ( self)

Simulate a 12-bit AD.

◆ get_fpga_revision()

wasatch.simulation_protocol.SimulateMaterial.get_fpga_revision ( self)

◆ get_integration_time_ms()

wasatch.simulation_protocol.SimulateMaterial.get_integration_time_ms ( self)

◆ get_laser_temperature_degC()

wasatch.simulation_protocol.SimulateMaterial.get_laser_temperature_degC ( self,
raw = 0 )

Return randomized laser and ccd temperature simulation within range.

◆ get_laser_temperature_raw()

wasatch.simulation_protocol.SimulateMaterial.get_laser_temperature_raw ( self)

◆ get_line()

wasatch.simulation_protocol.SimulateMaterial.get_line ( self)

Wrap the read data simulation in a sleep-wait to ensure fidelity for longer exposure integration times.

◆ get_model_number()

wasatch.simulation_protocol.SimulateMaterial.get_model_number ( self)

◆ get_sensor_line_length()

wasatch.simulation_protocol.SimulateMaterial.get_sensor_line_length ( self)

◆ get_serial_number()

wasatch.simulation_protocol.SimulateMaterial.get_serial_number ( self)

◆ get_standard_software_code()

wasatch.simulation_protocol.SimulateMaterial.get_standard_software_code ( self)

◆ load_raw_data()

wasatch.simulation_protocol.SimulateMaterial.load_raw_data ( self,
filename = None )

Apparently MS windows keeps some portion of the dictreader in place that prevents a clean exit in multiprocessing applications.

This will only manifest when attempting to close the enlighten software. The temporary fix here is to load the file directly from disk, and manually slice the data required.

◆ read()

wasatch.simulation_protocol.SimulateMaterial.read ( self)

Return the spectrum read from file.

Add the noise.

◆ set_degC_to_dac_coeffs()

wasatch.simulation_protocol.SimulateMaterial.set_degC_to_dac_coeffs ( self,
coeffs )

Temporary solution for modifying the CCD TEC setpoint calibration coefficients.

These are used as part of a third order polynomial for transforming the setpoint temperature into an AD value. Expects a great deal of accuracy on part of the user, otherwise sets default.

◆ write_setting()

wasatch.simulation_protocol.SimulateMaterial.write_setting ( self,
record )

Perform the specified setting such as simulating a laser enable, changing the integration time, turning the cooler on etc.

Member Data Documentation

◆ bad_pixels

list wasatch.simulation_protocol.SimulateMaterial.bad_pixels = []

◆ ccd_adc_setpoint

int wasatch.simulation_protocol.SimulateMaterial.ccd_adc_setpoint = 2047

◆ ccd_gain

float wasatch.simulation_protocol.SimulateMaterial.ccd_gain = 1.9

◆ degC_to_dac_coeff_0

float wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_0 = self.original_degC_to_dac_coeff_0

◆ degC_to_dac_coeff_1

float wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_1 = self.original_degC_to_dac_coeff_1

◆ degC_to_dac_coeff_2

float wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_2 = self.original_degC_to_dac_coeff_2

◆ detector_tec_enable

int wasatch.simulation_protocol.SimulateMaterial.detector_tec_enable = 0

◆ detector_tec_setpoint_degC

float wasatch.simulation_protocol.SimulateMaterial.detector_tec_setpoint_degC = 15.0

◆ fpga_revision

str wasatch.simulation_protocol.SimulateMaterial.fpga_revision = "SIM.022-007"

◆ initial_data

wasatch.simulation_protocol.SimulateMaterial.initial_data = self.startup_noise

◆ integration

wasatch.simulation_protocol.SimulateMaterial.integration = self.min_integration

◆ ipa_data

int wasatch.simulation_protocol.SimulateMaterial.ipa_data = numpy.asarray(self.load_raw_data()[0])

◆ laser_status

str wasatch.simulation_protocol.SimulateMaterial.laser_status = "disable"

◆ max_integration

int wasatch.simulation_protocol.SimulateMaterial.max_integration = 10000

◆ min_integration

int wasatch.simulation_protocol.SimulateMaterial.min_integration = 1

◆ model

str wasatch.simulation_protocol.SimulateMaterial.model = "785"

◆ noise_level

wasatch.simulation_protocol.SimulateMaterial.noise_level = self.max_integration - self.integration

◆ noise_margin

int wasatch.simulation_protocol.SimulateMaterial.noise_margin = 100

◆ original_degC_to_dac_coeff_0

float wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_0 = 3566.62

◆ original_degC_to_dac_coeff_1

float wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_1 = -143.543

◆ original_degC_to_dac_coeff_2

float wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_2 = -0.324723

◆ pixels

int wasatch.simulation_protocol.SimulateMaterial.pixels = 1024

◆ serial_number

str wasatch.simulation_protocol.SimulateMaterial.serial_number = "SIM-512"

◆ signal_modifier

int wasatch.simulation_protocol.SimulateMaterial.signal_modifier = self.integration

◆ software_code

str wasatch.simulation_protocol.SimulateMaterial.software_code = "SIM.0.0.1"

◆ startup_noise

wasatch.simulation_protocol.SimulateMaterial.startup_noise = startup_noise

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