|
ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
|
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 | |
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.
| wasatch.simulation_protocol.SimulateMaterial.__init__ | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.disconnect | ( | self | ) |
Placeholder to log disconnect event.
| wasatch.simulation_protocol.SimulateMaterial.get_ccd_gain | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_detector_temperature_degC | ( | self, | |
| raw = 0 ) |
Return randomized laser and detector temperature simulation within range.
| wasatch.simulation_protocol.SimulateMaterial.get_detector_temperature_raw | ( | self | ) |
Simulate a 12-bit AD.
| wasatch.simulation_protocol.SimulateMaterial.get_fpga_revision | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_integration_time_ms | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_laser_temperature_degC | ( | self, | |
| raw = 0 ) |
Return randomized laser and ccd temperature simulation within range.
| wasatch.simulation_protocol.SimulateMaterial.get_laser_temperature_raw | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_line | ( | self | ) |
Wrap the read data simulation in a sleep-wait to ensure fidelity for longer exposure integration times.
| wasatch.simulation_protocol.SimulateMaterial.get_model_number | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_sensor_line_length | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_serial_number | ( | self | ) |
| wasatch.simulation_protocol.SimulateMaterial.get_standard_software_code | ( | self | ) |
| 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.
| wasatch.simulation_protocol.SimulateMaterial.read | ( | self | ) |
Return the spectrum read from file.
Add the noise.
| 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.
| 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.
| list wasatch.simulation_protocol.SimulateMaterial.bad_pixels = [] |
| int wasatch.simulation_protocol.SimulateMaterial.ccd_adc_setpoint = 2047 |
| float wasatch.simulation_protocol.SimulateMaterial.ccd_gain = 1.9 |
| float wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_0 = self.original_degC_to_dac_coeff_0 |
| float wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_1 = self.original_degC_to_dac_coeff_1 |
| float wasatch.simulation_protocol.SimulateMaterial.degC_to_dac_coeff_2 = self.original_degC_to_dac_coeff_2 |
| int wasatch.simulation_protocol.SimulateMaterial.detector_tec_enable = 0 |
| float wasatch.simulation_protocol.SimulateMaterial.detector_tec_setpoint_degC = 15.0 |
| str wasatch.simulation_protocol.SimulateMaterial.fpga_revision = "SIM.022-007" |
| wasatch.simulation_protocol.SimulateMaterial.initial_data = self.startup_noise |
| wasatch.simulation_protocol.SimulateMaterial.integration = self.min_integration |
| int wasatch.simulation_protocol.SimulateMaterial.ipa_data = numpy.asarray(self.load_raw_data()[0]) |
| str wasatch.simulation_protocol.SimulateMaterial.laser_status = "disable" |
| int wasatch.simulation_protocol.SimulateMaterial.max_integration = 10000 |
| int wasatch.simulation_protocol.SimulateMaterial.min_integration = 1 |
| str wasatch.simulation_protocol.SimulateMaterial.model = "785" |
| wasatch.simulation_protocol.SimulateMaterial.noise_level = self.max_integration - self.integration |
| int wasatch.simulation_protocol.SimulateMaterial.noise_margin = 100 |
| float wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_0 = 3566.62 |
| float wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_1 = -143.543 |
| float wasatch.simulation_protocol.SimulateMaterial.original_degC_to_dac_coeff_2 = -0.324723 |
| int wasatch.simulation_protocol.SimulateMaterial.pixels = 1024 |
| str wasatch.simulation_protocol.SimulateMaterial.serial_number = "SIM-512" |
| int wasatch.simulation_protocol.SimulateMaterial.signal_modifier = self.integration |
| str wasatch.simulation_protocol.SimulateMaterial.software_code = "SIM.0.0.1" |
| wasatch.simulation_protocol.SimulateMaterial.startup_noise = startup_noise |