ElectrometerCommandFactory

class lsst.ts.electrometer.ElectrometerCommandFactory

Bases: object

Class that formats commands to control the electrometer via RS-232.

Methods Summary

activate_filter(mode, filter_type, active)

Return activate filter command.

always_read()

Return always read buffer.

clear_buffer()

Return clear buffer.

clear_device()

Return clear device.

disable_all()

Return combo of commands for disable all command.

enable_all_instrument_errors()

Return enable all instrument errors.

enable_display(enable)

Return enable display command string.

enable_sync(enable)

Return enable sync.

enable_temperature_reading(enable)

Return enable temperature reading.

enable_zero_check(enable)

Return enable zero check.

enable_zero_correction(enable)

Return enable zero correction.

format_trac([channel, timestamp, ...])

Return format data stored to the buffer.

get_avg_filter_status(mode)

Return average filter status.

get_buffer_quantity()

Return get buffer quantity.

get_filter_status(mode, filter_type)

Return filter status.

get_hardware_info()

Return get hardware info.

get_integration_time(mode)

Return get integration time command string.

get_last_error()

Return get last error.

get_measure(read_option)

Return get measure.

get_med_filter_status(mode)

Return median filter status.

get_mode()

Return get mode.

get_range(mode)

Return get range command string.

get_voltage_level()

get_voltage_limit()

get_voltage_range()

get_voltage_source_status()

init_buffer()

Return start storing readings into the buffer.

integration_time(mode[, time])

Return integration time.

next_read()

Return next read buffer.

output_trigger_line(output_trigger_input)

Sets output trigger line

perform_zero_calibration(mode, auto, range_value)

Return combo of commands for perform zero calibration command.

prepare_buffer()

Return combo of commands for prepare buffer command.

read_buffer()

Return read buffer.

reset_device()

Return reset device.

select_device_timer([timer])

Return select device timer.

select_source([source])

set_avg_filter_status(mode, aver_filter_type)

Return set average filter status.

set_buffer_size([buffer_size])

Return set buffer size.

set_med_filter_status(mode, active)

Return set median filter status

set_mode(mode)

Return set mode.

set_range(auto, range_value, mode)

Return set range.

set_resolution(mode, digit)

set_timer(mode)

Return set time command string.

set_voltage_level(amplititude)

set_voltage_limit(limit)

set_voltage_range(range)

stop_storing_buffer()

Return stop storing buffer.

toggle_voltage_source(enable)

Methods Documentation

activate_filter(mode, filter_type, active) str

Return activate filter command.

Parameters:
modeUnitMode

The unit of the filter to activate.

filter_typeFilter

The filter type to activate

activeint

Whether to activate or not.

Returns:
commandstr

The generated command string.

always_read() str

Return always read buffer.

Returns:
commmandstr

The generated command string.

clear_buffer()

Return clear buffer.

Returns:
commandstr

The generated command string.

clear_device()

Return clear device.

Returns:
commandstr

The generated command string.

disable_all()

Return combo of commands for disable all command.

Returns:
commandstr

The generated command string.

enable_all_instrument_errors()

Return enable all instrument errors.

Returns:
commandstr

The generated command string.

enable_display(enable)

Return enable display command string.

Parameters:
enablebool

Whether to enable the display.

Returns:
commandstr

The generated command string.

enable_sync(enable)

Return enable sync.

Parameters:
enablebool

Whether to enable sync.

Returns:
commandstr

The generated command string.

enable_temperature_reading(enable)

Return enable temperature reading.

Parameters:
enablebool

Whether to enable temperature reading.

Returns:
commandstr

The generated command string.

enable_zero_check(enable)

Return enable zero check.

Parameters:
enablebool

Whether to enable zero check.

Returns:
commandstr

The generated command string.

enable_zero_correction(enable)

Return enable zero correction.

Parameters:
enablebool

Whether to enable zero correction.

Returns:
commandstr

The generated command string.

format_trac(channel=False, timestamp=True, temperature=False, voltage=False)

Return format data stored to the buffer.

Parameters:
channelbool

Whether to store channel data.

timestampbool

Whether to store timestamp data.

temperaturebool

Whether to store temperature data.

Returns:
commandstr

The generated command string.

get_avg_filter_status(mode) str

Return average filter status.

Parameters:
modeUnitMode

The unit of the filter to check.

Returns:
commandstr

The generated command string.

get_buffer_quantity()

Return get buffer quantity.

Returns:
commandstr

The generated command string.

get_filter_status(mode, filter_type) str

Return filter status.

Parameters:
modeUnitMode

The unit of the filter to check

filter_typeFilter

The type of the filter to check.

Returns:
commandstr

The generated command string.

get_hardware_info()

Return get hardware info.

Returns:
commandstr

The generated command string.

get_integration_time(mode)

Return get integration time command string.

Parameters:
modeUnitMode

The unit of the integration time to check.

Returns:
commandstr

The generated command string.

get_last_error()

Return get last error.

Returns:
commandstr

The generated command string.

get_measure(read_option)

Return get measure.

Parameters:
read_optionReadingOption

The reading option.

Returns:
commandstr

The generated command string.

get_med_filter_status(mode) str

Return median filter status.

Parameters:
modeUnitMode

The unit of the filter to check.

Returns:
commandstr

The generated command string.

get_mode()

Return get mode.

Returns:
commandstr

The generated command string.

get_range(mode)

Return get range command string.

Parameters:
modeUnitMode

The unit of the range to check.

Returns:
commandstr

The generated command string.

get_voltage_level()
get_voltage_limit()
get_voltage_range()
get_voltage_source_status()
init_buffer()

Return start storing readings into the buffer.

Returns:
commandstr

The generated command string.

integration_time(mode, time=0.001)

Return integration time.

Parameters:
modeUnitMode

The unit of the aperature to set.

timefloat

The integration time of the aperture.

Returns:
commandstr

The generated command string.

next_read()

Return next read buffer.

Returns:
commandstr

The generated command string.

output_trigger_line(output_trigger_input)

Sets output trigger line

Returns:
commandstr

The generated command string.

perform_zero_calibration(mode, auto, range_value)

Return combo of commands for perform zero calibration command. Required when setting mode to Volts/Amps to cancel any internal offsets. See page 4-10 in User’s manual for sequence

Parameters:
modeUnitMode

The unit of the device

autobool

Whether auto range is activated.

range_valuefloat

The range of the values.

Returns:
commandstr

The generated command string

prepare_buffer()

Return combo of commands for prepare buffer command.

Returns:
commandstr

The generated command string.

read_buffer()

Return read buffer.

Returns:
commandstr

The generated command string.

reset_device()

Return reset device.

Returns:
commandstr

The generated command string.

select_device_timer(timer=0.001)

Return select device timer.

Parameters:
timerfloat

The internal device loop timer. Values below 0.001 can cause instability.

Returns:
commandstr

The generated command string.

select_source(source=Source.TIM)
set_avg_filter_status(mode, aver_filter_type) str

Return set average filter status.

Parameters:
modeUnitMode

The unit of the filter to set.

aver_filter_typeAverFilterType

The type of the average filter to set.

Returns:
commandstr

The generated command string.

set_buffer_size(buffer_size=50000)

Return set buffer size.

Parameters:
buffer_size: `int`

The number of values to store in the buffer. Maximum is 50000.

set_med_filter_status(mode, active) str

Return set median filter status

Parameters:
modeUnitMode

The unit of the filter to set.

activeint

Whether to activate.

Returns:
commandstr

The generated command string.

set_mode(mode)

Return set mode.

Parameters:
modeUnitMode

The unit to switch to.

Returns:
commandstr

The generated command string.

set_range(auto, range_value, mode)

Return set range.

Parameters:
autobool

Whether auto range is activated.

range_valuefloat

The range to set. Not used if auto is true.

modeenums.UnitMode

The unit of the range to set.

Returns:
commandstr

The generated command string.

set_resolution(mode, digit)
set_timer(mode)

Return set time command string.

Returns:
commandstr

The generated command string.

set_voltage_level(amplititude)
set_voltage_limit(limit)
set_voltage_range(range)
stop_storing_buffer()

Return stop storing buffer.

Returns:
commandstr

The generated command string.

toggle_voltage_source(enable)