ElectrometerController¶
- class lsst.ts.electrometer.ElectrometerController(csc, log=None)¶
Bases:
object
Class that provides high level control for electrometer.
- Parameters:
- csc
ElectrometerCSC
A copy of the CSC.
- log
None
orlogging.Logger
A logger.
- csc
- Attributes:
- commander
commander.Commander
The tcpip interface for writing and reading from the device.
- commands
ElectrometerCommandFactory
The interface for providing formatted commands for the commander.
- mode
UnitMode
The mode/unit of the electrometer.
- range
float
The range of intensities that the electrometer can read.
- integration_time
float
The amount of time the electrometer reads per scan.
- median_filter_active
bool
Whether the median filter is active.
- filter_active
bool
Whether any filter is active.
- avg_filter_active
bool
Whether the average filter is active.
- connected
bool
Whether the port is open.
- last_value
int
The last value of the electrometer intensity read.
- read_freq
float
The frequency that readings are gotten from the device buffer.
- configuration_delay
float
The delay to allow the electrometer to configure.
- auto_range
bool
Whether automatic range is active.
- manual_start_time
float
The start TAI time of a scan [s].
- manual_end_time
float
The end TAI time of a scan [s].
- serial_lock
asyncio.Lock
The lock for protecting the synchronous serial communication.
- modes
dict
Associate SAL Command number with electrometer UnitMode enum.
- voltage_status
bool
Is voltage source enabled.
- temperature
float
The temperature (deg_C) returned from the probe.
- vsource
float
The voltage (V) source input.
- commander
Attributes Summary
Methods Summary
Check the error.
configure
(config)Configure the controller.
connect
()Open connection to the electrometer.
Close connection to the electrometer.
Get the average filter status.
Get the integration time value.
Get the intensity.
Get the median filter status.
get_mode
()Get the mode/unit.
Get the range value.
Make primary header for fits file that follows Rubin Obs.
parse_buffer
(response)Parse the buffer values.
Perform zero calibration.
Prepare the keithley for scanning.
send_command
(command[, has_reply, timeout])Send a command to the device and return a reply if it has one.
set_digital_filter
(activate_filter, ...)Set the digital filter(s).
set_integration_time
(int_time)Set the integration time.
set_mode
(mode)Set the mode/unit.
set_range
(set_range)Set the range.
set_voltage_level
(level)set_voltage_limit
(limit)set_voltage_range
(range)Start storing values in the Keithley electrometer's buffer.
start_scan_dt
(scan_duration)Start storing values in the Keithley electrometer's buffer, for a set duration.
Stop storing values in the Keithley electrometer.
toggle_voltage_source
(toggle)write_fits_file
(signal, times, temperature, ...)Write fits file of the intensity, time, and temperature values.
Attributes Documentation
- connected¶
Methods Documentation
- async check_error()¶
Check the error.
- configure(config: SimpleNamespace) None ¶
Configure the controller.
- Parameters:
- config
types.SimpleNamespace
The parsed yaml as a dict-like object.
- config
- async get_avg_filter_status()¶
Get the average filter status.
- async get_integration_time()¶
Get the integration time value.
- async get_intensity()¶
Get the intensity.
- async get_med_filter_status()¶
Get the median filter status.
- async get_mode()¶
Get the mode/unit.
- async get_range()¶
Get the range value.
- async get_voltage_level()¶
- async get_voltage_limit()¶
- async get_voltage_range()¶
- async get_voltage_source_status()¶
- make_primary_header()¶
Make primary header for fits file that follows Rubin Obs. format.
- parse_buffer(response)¶
Parse the buffer values.
- async perform_zero_calibration()¶
Perform zero calibration.
- async prepare_scan()¶
Prepare the keithley for scanning.
- async send_command(command: str, has_reply: bool = False, timeout: Optional[int] = None)¶
Send a command to the device and return a reply if it has one.
- async set_digital_filter(activate_filter: bool, activate_avg_filter: bool, activate_med_filter: bool)¶
Set the digital filter(s).
- async set_integration_time(int_time)¶
Set the integration time.
- Parameters:
- int_time
float
The integration time.
- int_time
- async set_voltage_level(level)¶
- async set_voltage_limit(limit)¶
- async set_voltage_range(range)¶
- async start_scan()¶
Start storing values in the Keithley electrometer’s buffer.
- async start_scan_dt(scan_duration)¶
Start storing values in the Keithley electrometer’s buffer, for a set duration.
- Parameters:
- scan_duration
float
The amount of time to store values for.
- scan_duration
- async stop_scan()¶
Stop storing values in the Keithley electrometer.
- async toggle_voltage_source(toggle)¶
- async write_fits_file(signal, times, temperature, unit, voltage)¶
Write fits file of the intensity, time, and temperature values.
- Parameters:
- signal
list
offloat
The amount of photons in a given reading, unit depends on mode of electrometer. * Curr: Ampere - Measure current * Volt: V - Measure volts * Char: Coulomb - Measure charge
- times
list
offloat
The time (TAI) of the signal data taken.
- temperature
list
offloat
A consistent temperature value (deg_C) obtained from the temperature probe over the period of signal acquisition.
- unit
list
ofstr
The unit of the signal data. (constant)
- voltage
list
offloat
The source input in Volts maintained during signal acquisition.
- signal