|
Wasatch.PY
Python application driver for Wasatch Photonics spectrometers
|
Public Member Functions | |
| __init__ (self, device_id, message_queue=None) | |
| acquire_data (self) | |
| check_result (self, result, func) | |
| Public Methods. | |
| connect (self) | |
| get_error_code (self, code) | |
| get_error_code_long (self, code) | |
| get_serial_number (self) | |
| high_gain_mode_enable (self, bool enabled) | |
| init_detector_area (self) | |
| init_detector_speed (self) | |
| init_tec_setpoint (self) | |
| load_error_codes (self) | |
| save_config (self, eeprom=None) | |
| scans_to_average (self, int value) | |
| set_fan_enable (self, bool x) | |
| set_integration_time_ms (self, float ms) | |
| set_shutter_enable (self, bool enable) | |
| set_tec_setpoint (self, set_temp) | |
| toggle_tec (self, toggle_state) | |
| update_config_from_eeprom (self, eeprom) | |
Public Member Functions inherited from wasatch.InterfaceDevice.InterfaceDevice | |
| handle_requests (self, list[SpectrometerRequest] requests) | |
Static Public Attributes | |
| int | SHUTTER_SPEED_MS = 50 |
| int | SUCCESS = 20002 |
Protected Member Functions | |
| _check_config_file (self) | |
| _close_ex_shutter (self) | |
| _get_default_data_dir (self) | |
| _get_spectrum_raw (self) | |
| _init_process_funcs (self) | |
| Private Methods. | |
| _load_config_values (self) | |
| _obtain_gain_info (self) | |
| _open_ex_shutter (self) | |
| _take_one_averaged_reading (self) | |
| _update_wavelength_coeffs (self, list[float] coeffs) | |
Protected Attributes | |
| _scan_averaging | |
This is the basic implementation of our interface with Andor cameras
@todo have check_result return a SpectrometerResponse
@todo try to auto-detect whether x-axis needs inverted via DLL.GetImageFlip()
##########################################################################
This class adopts the external device interface structure.
This involves receiving a request through the handle_request function.
A request is processed based on the key in the request.
The processing function passes the commands to the requested device.
Once it receives a response from the connected device it then passes that
back up the chain.
@verbatim
Enlighten Request
|
handle_requests
|
------------
/ / | \ \
{ get_laser status, acquire, set_laser_watchdog, etc....}
\ \ | / /
------------
|
{self.driver.some_andor_sdk_call}
@endverbatim
############################################################################
| wasatch.AndorDevice.AndorDevice.__init__ | ( | self, | |
| device_id, | |||
| message_queue = None ) |
Any class that communicates to a spectrometer should inherit this class. It provides the common functions that avoid repeated code.
Reimplemented from wasatch.InterfaceDevice.InterfaceDevice.
|
protected |
|
protected |
|
protected |
|
protected |
@todo missing bad-pixel correction
|
protected |
Private Methods.
|
protected |
Loads configuration from file `self.config_file` and populates `self.settings.eeprom` with members.
|
protected |
|
protected |
|
protected |
|
protected |
| wasatch.AndorDevice.AndorDevice.acquire_data | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.check_result | ( | self, | |
| result, | |||
| func ) |
Public Methods.
| wasatch.AndorDevice.AndorDevice.connect | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.get_error_code | ( | self, | |
| code ) |
| wasatch.AndorDevice.AndorDevice.get_error_code_long | ( | self, | |
| code ) |
| wasatch.AndorDevice.AndorDevice.get_serial_number | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.high_gain_mode_enable | ( | self, | |
| bool | enabled ) |
| wasatch.AndorDevice.AndorDevice.init_detector_area | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.init_detector_speed | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.init_tec_setpoint | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.load_error_codes | ( | self | ) |
| wasatch.AndorDevice.AndorDevice.save_config | ( | self, | |
| eeprom = None ) |
The user has edited the "virtual EEPROM", for instance using ENLIGHTEN's
EEPROM Editor, and wants to save the new EEPROM. Therefore we need to
generate a fresh JSON equivalent and write it to disk.
@param eeprom: if provided, overwrite current settings with those in the
passed dict before writing to disk
| wasatch.AndorDevice.AndorDevice.scans_to_average | ( | self, | |
| int | value ) |
| wasatch.AndorDevice.AndorDevice.set_fan_enable | ( | self, | |
| bool | x ) |
| wasatch.AndorDevice.AndorDevice.set_integration_time_ms | ( | self, | |
| float | ms ) |
| wasatch.AndorDevice.AndorDevice.set_shutter_enable | ( | self, | |
| bool | enable ) |
| wasatch.AndorDevice.AndorDevice.set_tec_setpoint | ( | self, | |
| set_temp ) |
| wasatch.AndorDevice.AndorDevice.toggle_tec | ( | self, | |
| toggle_state ) |
| wasatch.AndorDevice.AndorDevice.update_config_from_eeprom | ( | self, | |
| eeprom ) |
Populates a dict used to update the configuration file `self.config_file` from `self.settings.eeprom` members.
|
protected |
| wasatch.AndorDevice.AndorDevice.boxcar_half_width |
| wasatch.AndorDevice.AndorDevice.command_queue |
| wasatch.AndorDevice.AndorDevice.config_dir |
| wasatch.AndorDevice.AndorDevice.config_file |
| wasatch.AndorDevice.AndorDevice.config_names_to_eeprom |
| wasatch.AndorDevice.AndorDevice.config_values |
| wasatch.AndorDevice.AndorDevice.connected |
| wasatch.AndorDevice.AndorDevice.dark |
| wasatch.AndorDevice.AndorDevice.device_id |
| wasatch.AndorDevice.AndorDevice.dll_fail |
| wasatch.AndorDevice.AndorDevice.driver |
| wasatch.AndorDevice.AndorDevice.error_codes |
| wasatch.AndorDevice.AndorDevice.failure_count |
| wasatch.AndorDevice.AndorDevice.gain_idx |
| wasatch.AndorDevice.AndorDevice.gain_options |
| wasatch.AndorDevice.AndorDevice.height |
| wasatch.AndorDevice.AndorDevice.immediate_mode |
| wasatch.AndorDevice.AndorDevice.integration_time_ms |
| wasatch.AndorDevice.AndorDevice.last_battery_percentage |
| wasatch.AndorDevice.AndorDevice.last_memory_check |
| wasatch.AndorDevice.AndorDevice.message_queue |
| wasatch.AndorDevice.AndorDevice.pixels |
| wasatch.AndorDevice.AndorDevice.process_f |
| wasatch.AndorDevice.AndorDevice.process_id |
| wasatch.AndorDevice.AndorDevice.serial |
| wasatch.AndorDevice.AndorDevice.session_reading_count |
| wasatch.AndorDevice.AndorDevice.setpoint_deg_c |
| wasatch.AndorDevice.AndorDevice.settings |
|
static |
| wasatch.AndorDevice.AndorDevice.SHUTTER_SPEED_MS |
| wasatch.AndorDevice.AndorDevice.spec_index |
|
static |
| wasatch.AndorDevice.AndorDevice.sum_count |
| wasatch.AndorDevice.AndorDevice.summed_spectra |
| wasatch.AndorDevice.AndorDevice.take_one |
| wasatch.AndorDevice.AndorDevice.tec_enabled |