MockKeysight#
- class lsst.ts.electrometer.MockKeysight#
Bases:
objectMock a Keysight electrometer command parser.
- log#
The log.
- Type:
logging.Logger
- commands#
Regular expressions mapped to command handler methods.
- Type:
dict
- integration_time#
Current integration time, in seconds.
- Type:
float
Methods Summary
Acquire one mock data record.
do_activate_filter(*args)Activate filter(s).
do_change_nplc(nplc)Change the number of programmable logic cycles.
do_change_sync(sync)Change the line synchronization setting.
Clear the buffer.
do_enable_zero_check(*args)Enable zero check.
do_enable_zero_correction(*args)Enable zero correction.
do_format_trac(*args)Format the trac.
Get the status of the filter in average mode.
Return hardware information.
Get the integration time setting.
Get the most recent error.
Get the state of the filter in median mode.
Get the current mode.
Get the NPLC value.
Get the range setting.
Return the configured trace format.
Initialize the buffer.
do_integration_time(parameter)Set the integration time setting.
Read the next value.
Accept a command without changing state or returning a reply.
Configure the output trigger line.
Read the values in the buffer.
Read the sensor.
Reset the device.
Switch to RTClock mode.
do_select_device_timer(*args)Select the device timer.
Get the status of the filter in average mode.
Set the buffer size.
do_set_mode(*args)Set the mode.
do_set_range(*args)Set the range.
Stop storing to the buffer.
do_toggle_voltage_source(toggle)Set voltage source status.
Return the latest intensity value.
Get voltage source level.
Get voltage source limit.
Get voltage source range.
Get voltage source status.
parse_message(msg)Parse a command message and return the device reply.
Set measurement resolution.
Set voltage source level.
Set voltage source limit.
Set voltage source range.
Methods Documentation
- do_acquire_data()#
Acquire one mock data record.
- do_activate_filter(*args)#
Activate filter(s).
- do_change_nplc(nplc)#
Change the number of programmable logic cycles.
- Parameters:
nplc (
int) – The number of cycles.
- do_change_sync(sync)#
Change the line synchronization setting.
- Parameters:
sync (
bool) – Turn on line synchronization.
- do_clear_buffer()#
Clear the buffer.
- do_enable_zero_check(*args)#
Enable zero check.
- do_enable_zero_correction(*args)#
Enable zero correction.
- do_format_trac(*args)#
Format the trac.
- do_get_avg_filter_status()#
Get the status of the filter in average mode.
- do_get_hardware_info()#
Return hardware information.
- do_get_integration_time()#
Get the integration time setting.
- do_get_last_error()#
Get the most recent error.
- do_get_med_filter_status()#
Get the state of the filter in median mode.
- do_get_mode()#
Get the current mode.
- do_get_nplc()#
Get the NPLC value.
- do_get_range()#
Get the range setting.
- do_get_trace_format()#
Return the configured trace format.
- do_init_buffer()#
Initialize the buffer.
- do_integration_time(parameter)#
Set the integration time setting.
- do_next_read()#
Read the next value.
- do_nothing()#
Accept a command without changing state or returning a reply.
- do_output_trigger_line()#
Configure the output trigger line.
- do_read_buffer()#
Read the values in the buffer.
- do_read_sensor()#
Read the sensor.
- do_reset_device()#
Reset the device.
- do_rtc_time()#
Switch to RTClock mode.
- do_select_device_timer(*args)#
Select the device timer.
- do_set_avg_filter_status()#
Get the status of the filter in average mode.
- do_set_buffer_size()#
Set the buffer size.
- do_set_mode(*args)#
Set the mode.
- do_set_range(*args)#
Set the range.
- do_stop_storing_buffer()#
Stop storing to the buffer.
- do_toggle_voltage_source(toggle)#
Set voltage source status.
- get_intensity()#
Return the latest intensity value.
- get_voltage_level()#
Get voltage source level.
- get_voltage_limit()#
Get voltage source limit.
- get_voltage_range()#
Get voltage source range.
- get_voltage_source_status()#
Get voltage source status.
- parse_message(msg)#
Parse a command message and return the device reply.
- Parameters:
msg (
str) – The message to parse.- Returns:
reply – Reply generated for the parsed command, if any.
- Return type:
strorNone- Raises:
NotImplementedError – Raised when command is not implemented.
- set_resolution()#
Set measurement resolution.
- set_voltage_level()#
Set voltage source level.
- set_voltage_limit()#
Set voltage source limit.
- set_voltage_range()#
Set voltage source range.