Wasatch.PY
Python application driver for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
wasatch.AndorDevice.AndorDevice Class Reference
Inheritance diagram for wasatch.AndorDevice.AndorDevice:
wasatch.InterfaceDevice.InterfaceDevice

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)
 

Public Attributes

 boxcar_half_width
 
 command_queue
 
 config_dir
 
 config_file
 
 config_names_to_eeprom
 
 config_values
 
 connected
 
 dark
 
 device_id
 
 dll_fail
 
 driver
 
 error_codes
 
 failure_count
 
 gain_idx
 
 gain_options
 
 height
 
 immediate_mode
 
 integration_time_ms
 
 last_battery_percentage
 
 last_memory_check
 
 message_queue
 
 pixels
 
 process_f
 
 process_id
 
 serial
 
 session_reading_count
 
 setpoint_deg_c
 
 settings
 
 SHUTTER_SPEED_MS
 
 spec_index
 
 sum_count
 
 summed_spectra
 
 take_one
 
 tec_enabled
 
- Public Attributes inherited from wasatch.InterfaceDevice.InterfaceDevice
 process_f
 
 remaining_throwaways
 

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
 

Detailed Description

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
############################################################################

Constructor & Destructor Documentation

◆ __init__()

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.

Member Function Documentation

◆ _check_config_file()

wasatch.AndorDevice.AndorDevice._check_config_file ( self)
protected

◆ _close_ex_shutter()

wasatch.AndorDevice.AndorDevice._close_ex_shutter ( self)
protected

◆ _get_default_data_dir()

wasatch.AndorDevice.AndorDevice._get_default_data_dir ( self)
protected

◆ _get_spectrum_raw()

wasatch.AndorDevice.AndorDevice._get_spectrum_raw ( self)
protected
@todo missing bad-pixel correction

◆ _init_process_funcs()

wasatch.AndorDevice.AndorDevice._init_process_funcs ( self)
protected

Private Methods.

◆ _load_config_values()

wasatch.AndorDevice.AndorDevice._load_config_values ( self)
protected
Loads configuration from file `self.config_file` and populates `self.settings.eeprom` with members.

◆ _obtain_gain_info()

wasatch.AndorDevice.AndorDevice._obtain_gain_info ( self)
protected

◆ _open_ex_shutter()

wasatch.AndorDevice.AndorDevice._open_ex_shutter ( self)
protected

◆ _take_one_averaged_reading()

wasatch.AndorDevice.AndorDevice._take_one_averaged_reading ( self)
protected

◆ _update_wavelength_coeffs()

wasatch.AndorDevice.AndorDevice._update_wavelength_coeffs ( self,
list[float] coeffs )
protected

◆ acquire_data()

wasatch.AndorDevice.AndorDevice.acquire_data ( self)

◆ check_result()

wasatch.AndorDevice.AndorDevice.check_result ( self,
result,
func )

Public Methods.

◆ connect()

wasatch.AndorDevice.AndorDevice.connect ( self)

◆ get_error_code()

wasatch.AndorDevice.AndorDevice.get_error_code ( self,
code )

◆ get_error_code_long()

wasatch.AndorDevice.AndorDevice.get_error_code_long ( self,
code )

◆ get_serial_number()

wasatch.AndorDevice.AndorDevice.get_serial_number ( self)

◆ high_gain_mode_enable()

wasatch.AndorDevice.AndorDevice.high_gain_mode_enable ( self,
bool enabled )

◆ init_detector_area()

wasatch.AndorDevice.AndorDevice.init_detector_area ( self)

◆ init_detector_speed()

wasatch.AndorDevice.AndorDevice.init_detector_speed ( self)

◆ init_tec_setpoint()

wasatch.AndorDevice.AndorDevice.init_tec_setpoint ( self)

◆ load_error_codes()

wasatch.AndorDevice.AndorDevice.load_error_codes ( self)
See also
ATMCD32D.H

◆ save_config()

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

◆ scans_to_average()

wasatch.AndorDevice.AndorDevice.scans_to_average ( self,
int value )

◆ set_fan_enable()

wasatch.AndorDevice.AndorDevice.set_fan_enable ( self,
bool x )

◆ set_integration_time_ms()

wasatch.AndorDevice.AndorDevice.set_integration_time_ms ( self,
float ms )

◆ set_shutter_enable()

wasatch.AndorDevice.AndorDevice.set_shutter_enable ( self,
bool enable )

◆ set_tec_setpoint()

wasatch.AndorDevice.AndorDevice.set_tec_setpoint ( self,
set_temp )

◆ toggle_tec()

wasatch.AndorDevice.AndorDevice.toggle_tec ( self,
toggle_state )

◆ update_config_from_eeprom()

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.

Member Data Documentation

◆ _scan_averaging

wasatch.AndorDevice.AndorDevice._scan_averaging
protected

◆ boxcar_half_width

wasatch.AndorDevice.AndorDevice.boxcar_half_width

◆ command_queue

wasatch.AndorDevice.AndorDevice.command_queue

◆ config_dir

wasatch.AndorDevice.AndorDevice.config_dir

◆ config_file

wasatch.AndorDevice.AndorDevice.config_file

◆ config_names_to_eeprom

wasatch.AndorDevice.AndorDevice.config_names_to_eeprom

◆ config_values

wasatch.AndorDevice.AndorDevice.config_values

◆ connected

wasatch.AndorDevice.AndorDevice.connected

◆ dark

wasatch.AndorDevice.AndorDevice.dark

◆ device_id

wasatch.AndorDevice.AndorDevice.device_id

◆ dll_fail

wasatch.AndorDevice.AndorDevice.dll_fail

◆ driver

wasatch.AndorDevice.AndorDevice.driver

◆ error_codes

wasatch.AndorDevice.AndorDevice.error_codes

◆ failure_count

wasatch.AndorDevice.AndorDevice.failure_count

◆ gain_idx

wasatch.AndorDevice.AndorDevice.gain_idx

◆ gain_options

wasatch.AndorDevice.AndorDevice.gain_options

◆ height

wasatch.AndorDevice.AndorDevice.height

◆ immediate_mode

wasatch.AndorDevice.AndorDevice.immediate_mode

◆ integration_time_ms

wasatch.AndorDevice.AndorDevice.integration_time_ms

◆ last_battery_percentage

wasatch.AndorDevice.AndorDevice.last_battery_percentage

◆ last_memory_check

wasatch.AndorDevice.AndorDevice.last_memory_check

◆ message_queue

wasatch.AndorDevice.AndorDevice.message_queue

◆ pixels

wasatch.AndorDevice.AndorDevice.pixels

◆ process_f

wasatch.AndorDevice.AndorDevice.process_f

◆ process_id

wasatch.AndorDevice.AndorDevice.process_id

◆ serial

wasatch.AndorDevice.AndorDevice.serial

◆ session_reading_count

wasatch.AndorDevice.AndorDevice.session_reading_count

◆ setpoint_deg_c

wasatch.AndorDevice.AndorDevice.setpoint_deg_c

◆ settings

wasatch.AndorDevice.AndorDevice.settings

◆ SHUTTER_SPEED_MS [1/2]

int wasatch.AndorDevice.AndorDevice.SHUTTER_SPEED_MS = 50
static

◆ SHUTTER_SPEED_MS [2/2]

wasatch.AndorDevice.AndorDevice.SHUTTER_SPEED_MS

◆ spec_index

wasatch.AndorDevice.AndorDevice.spec_index

◆ SUCCESS

int wasatch.AndorDevice.AndorDevice.SUCCESS = 20002
static

◆ sum_count

wasatch.AndorDevice.AndorDevice.sum_count

◆ summed_spectra

wasatch.AndorDevice.AndorDevice.summed_spectra

◆ take_one

wasatch.AndorDevice.AndorDevice.take_one

◆ tec_enabled

wasatch.AndorDevice.AndorDevice.tec_enabled

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