ElectrometerController¶
- class lsst.ts.electrometer.ElectrometerController(csc, log=None)¶
Bases:
ABC
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_error
(from_command)Check the error. Parameter --------- from_command :
str
| None Tells us where the check error is being called from.configure
(config)connect
()continuous_scan
(scan_duration)Part of start scan dt for Keithley
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[, num_categories])Parse the buffer values.
perform_zero_calibration
([mode, auto, ...])This enables the zero check and sets the mode and range before every measurement.
Prepare the keithley for scanning.
send_command
(command[, has_reply, timeout])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)Sets up the electrometer to prepare for scan.
start_scan
([group_id])Start storing values in the Keithley electrometer's buffer.
start_scan_dt
(scan_duration[, group_id])Start storing values in the Keithley electrometer's buffer, for a set duration.
Stop storing values in the electrometer.
toggle_voltage_source
(toggle)write_fits_file
(raw_data, data_format)Write fits file of the intensity, time, and temperature values.
Attributes Documentation
- connected¶
Methods Documentation
- async check_error(from_command: str | None)¶
Check the error. Parameter ——— from_command :
str
| NoneTells us where the check error is being called from
- abstract configure(config)¶
- async connect()¶
- async continuous_scan(scan_duration)¶
Part of start scan dt for Keithley
- async disconnect()¶
- async get_avg_filter_status()¶
Get the average filter status.
- abstract classmethod get_config_schema()¶
- 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, num_categories=2)¶
Parse the buffer values.
- async perform_zero_calibration(mode=None, auto=None, set_range=None, integration_time=None)¶
This enables the zero check and sets the mode and range before every measurement.
- async prepare_scan()¶
Prepare the keithley for scanning.
- async send_command(command, has_reply=False, timeout=None)¶
- async set_digital_filter(activate_filter, activate_avg_filter, activate_med_filter)¶
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 setup_scan()¶
Sets up the electrometer to prepare for scan.
- async start_scan(group_id=None)¶
Start storing values in the Keithley electrometer’s buffer.
- Parameters:
- group_id
str
| None The group id generated by the image server. This is passed into this method as it is called in the CSC, but it is used in write_fits_file
- group_id
- async start_scan_dt(scan_duration, group_id=None)¶
Start storing values in the Keithley electrometer’s buffer, for a set duration.
- async stop_scan()¶
Stop storing values in the electrometer.
- async toggle_voltage_source(toggle)¶
- async write_fits_file(raw_data, data_format)¶
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