Wasatch.PY
Python application driver 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

 bad_pixels
 
 ccd_adc_setpoint
 
 ccd_gain
 
 degC_to_dac_coeff_0
 
 degC_to_dac_coeff_1
 
 degC_to_dac_coeff_2
 
 detector_tec_enable
 
 detector_tec_setpoint_degC
 
 fpga_revision
 
 initial_data
 
 integration
 
 ipa_data
 
 laser_status
 
 max_integration
 
 min_integration
 
 model
 
 noise_level
 
 noise_margin
 
 original_degC_to_dac_coeff_0
 
 original_degC_to_dac_coeff_1
 
 original_degC_to_dac_coeff_2
 
 pixels
 
 serial_number
 
 signal_modifier
 
 software_code
 
 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

wasatch.simulation_protocol.SimulateMaterial.bad_pixels

◆ ccd_adc_setpoint

wasatch.simulation_protocol.SimulateMaterial.ccd_adc_setpoint

◆ ccd_gain

wasatch.simulation_protocol.SimulateMaterial.ccd_gain

◆ degC_to_dac_coeff_0

wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_0

◆ degC_to_dac_coeff_1

wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_1

◆ degC_to_dac_coeff_2

wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_2

◆ detector_tec_enable

wasatch.simulation_protocol.SimulateMaterial.detector_tec_enable

◆ detector_tec_setpoint_degC

wasatch.simulation_protocol.SimulateMaterial.detector_tec_setpoint_degC

◆ fpga_revision

wasatch.simulation_protocol.SimulateMaterial.fpga_revision

◆ initial_data

wasatch.simulation_protocol.SimulateMaterial.initial_data

◆ integration

wasatch.simulation_protocol.SimulateMaterial.integration

◆ ipa_data

wasatch.simulation_protocol.SimulateMaterial.ipa_data

◆ laser_status

wasatch.simulation_protocol.SimulateMaterial.laser_status

◆ max_integration

wasatch.simulation_protocol.SimulateMaterial.max_integration

◆ min_integration

wasatch.simulation_protocol.SimulateMaterial.min_integration

◆ model

wasatch.simulation_protocol.SimulateMaterial.model

◆ noise_level

wasatch.simulation_protocol.SimulateMaterial.noise_level

◆ noise_margin

wasatch.simulation_protocol.SimulateMaterial.noise_margin

◆ original_degC_to_dac_coeff_0

wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_0

◆ original_degC_to_dac_coeff_1

wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_1

◆ original_degC_to_dac_coeff_2

wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_2

◆ pixels

wasatch.simulation_protocol.SimulateMaterial.pixels

◆ serial_number

wasatch.simulation_protocol.SimulateMaterial.serial_number

◆ signal_modifier

wasatch.simulation_protocol.SimulateMaterial.signal_modifier

◆ software_code

wasatch.simulation_protocol.SimulateMaterial.software_code

◆ startup_noise

wasatch.simulation_protocol.SimulateMaterial.startup_noise

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