AxisDevice

class lsst.ts.MTMount.mock.AxisDevice(controller, device_id)

Bases: lsst.ts.MTMount.mock.base_device.BaseDevice

Mock axis controller device.

Suports all commands except MOVE_VELOCITY.

Parameters:
controller : MockController

Mock controller.

device_id : DeviceId

Device ID. Must be one of:

  • enums.DeviceId.AZIMUTH_AXIS
  • enums.DeviceId.ELEVATION_AXIS
  • enums.DeviceId.CAMERA_CABLE_WRAP

Notes

There is no mock azimuth cable wrap because in the real system the azimuth axis takes care of that cable wrap, so MTMountCsc has no need to send commands to it.

Attributes Summary

all_command_names
end_tai_unix Get the end time of the current path, as TAI unix seconds.

Methods Summary

add_methods() Add do_methods to the command dict
assert_enabled() Raise RuntimeError if the drive is not enabled.
assert_tracking_enabled(enabled) Raise RuntimeError if tracking is or is not enabled.
close()
do_drive_enable(command) Enable or disable the drive.
do_drive_reset(command) Reset the drive.
do_enable_tracking(command) Enable or disable tracking mode.
do_home(command) Home the actuator.
do_move(command) Set target position.
do_move_velocity(command)
do_power(command)
do_reset_alarm(command)
do_stop(command) Stop the actuator.
do_track(command) Specify a tracking target tai_time, position, velocity.
monitor_move_command(command) Monitor motion and report a move command as done.
supersede_move_command() Report the current move command (if any) as superseded.

Attributes Documentation

all_command_names = {'ELEVATION_AXIS_ENABLE_TRACKING', 'AZIMUTH_AXIS_STOP', 'OIL_SUPPLY_SYSTEM_POWER_COOLING', 'MIRROR_COVER_LOCKS_STOP', 'TOP_END_CHILLER_TRACK_AMBIENT', 'AZIMUTH_CABLE_WRAP_MOVE_VELOCITY', 'BALANCE_RESET_ALARM', 'AZIMUTH_CABLE_WRAP_DRIVE_RESET', 'STAND_BY', 'APPLICATION_EXIT', 'BOTH_AXES_MOVE', 'AZIMUTH_THERMAL_TRACK_AMBIENT', 'AZIMUTH_AXIS_DRIVE_RESET', 'ENCODER_INTERFACE_BOX_EXIT', 'MIRROR_COVERS_RESET_ALARM', 'DEPLOYABLE_PLATFORM_LOCK_EXTENSION', 'ELEVATION_AXIS_DRIVE_ENABLE', 'AZIMUTH_AXIS_RESET_ALARM', 'CAMERA_CABLE_WRAP_RESET_ALARM', 'MIRROR_COVERS_STOP', 'CAMERA_CABLE_WRAP_TRACK', 'STOP_MOUNT', 'CLEAR_ERRORS', 'STATE_INFO', 'TOP_END_CHILLER_POWER', 'ENCODER_INTERFACE_BOX_POWER', 'ELEVATION_AXIS_POWER', 'AZIMUTH_CABLE_WRAP_TRACK', 'SAFETY_RESET', 'OIL_SUPPLY_SYSTEM_RESET_ALARM', 'AZIMUTH_CABLE_WRAP_DRIVE_ENABLE', 'MIRROR_COVERS_OPEN', 'MOVE_TO_TARGET', 'AZIMUTH_AXIS_MOVE', 'ELEVATION_THERMAL_TRACK_AMBIENT', 'BALANCE_MOVE', 'SYSTEM_READY', 'OIL_SUPPLY_SYSTEM_POWER', 'MIRROR_COVER_LOCKS_POWER', 'TRANSFER_FUNCTION_ELEVATION_EXCITATION', 'PXI_COMMAND_DONE', 'LOCKING_PINS_RESET_ALARM', 'ELEVATION_AXIS_MOVE_VELOCITY', 'MIRROR_COVER_LOCKS_MOVE', 'CLOSE_MIRROR_COVER', 'CAMERA_CABLE_WRAP_MOVE', 'AZIMUTH_AXIS_HOME', 'ELEVATION_AXIS_STOP', 'LOCKING_PINS_MOVE_ALL', 'AZIMUTH_CABLE_WRAP_ENABLE_TRACKING', 'ERROR', 'ELEVATION_AXIS_RESET_ALARM', 'MIRROR_COVERS_MOVE_VELOCITY', 'OVERRIDE_CAUSES', 'AZIMUTH_AXIS_MOVE_VELOCITY', 'OPEN_MIRROR_COVER', 'AZIMUTH_AXIS_POWER', 'CAMERA_CABLE_WRAP_ENABLE_TRACKING', 'ELEVATION_AXIS_DRIVE_RESET', 'MIRROR_COVER_LOCKS_RESET_ALARM', 'BOTH_AXES_TRACK', 'DEPLOYABLE_PLATFORM_POWER', 'EXIT', 'CAMERA_CABLE_WRAP_DRIVE_RESET', 'ENABLE', 'START', 'ASK_FOR_SET_OF_SETTINGS', 'DEPLOYABLE_PLATFORM_RESET_ALARM', 'ELEVATION_THERMAL_POWER', 'DEPLOYABLE_PLATFORM_STOP', 'ELEVATION_AXIS_TRACK', 'DISABLE', 'AZIMUTH_CABLE_WRAP_MOVE', 'BALANCE_STOP', 'MAIN_POWER_SUPPLY_RESET_ALARM', 'ASK_FOR_COMMAND', 'MAIN_POWER_SUPPLY_POWER', 'OIL_SUPPLY_SYSTEM_POWER_OIL', 'MIRROR_COVER_LOCKS_MOVE_VELOCITY', 'TRANSFER_FUNCTION_AZIMUTH_EXCITATION', 'ENTER_CONTROL', 'CABINET_RESET_ALARM', 'ENCODER_INTERFACE_BOX_RESET', 'BALANCE_POWER', 'ELEVATION_AXIS_MOVE', 'LOCKING_PINS_POWER', 'DEPLOYABLE_PLATFORM_MOVE_VELOCITY', 'AZIMUTH_CABLE_WRAP_POWER', 'CAMERA_CABLE_WRAP_MOVE_VELOCITY', 'ENTER_PUBLISHONLY', 'LOCKING_PINS_MOVE', 'AZIMUTH_THERMAL_RESET_ALARM', 'ELEVATION_THERMAL_RESET_ALARM', 'DISABLE_CAMERA_WRAP', 'AZIMUTH_CABLE_WRAP_STOP', 'CAMERA_CABLE_WRAP_DRIVE_ENABLE', 'AZIMUTH_AXIS_TRACK', 'OIL_SUPPLY_SYSTEM_POWER_MAIN_PUMP', 'BOTH_AXES_STOP', 'MIRROR_COVERS_POWER', 'ENCODER_INTERFACE_BOX_REFERENCE', 'MIRROR_COVERS_MOVE', 'MIRROR_COVER_LOCKS_MOVE_ALL', 'CAMERA_CABLE_WRAP_POWER', 'ENABLE_CAMERA_WRAP', 'AZIMUTH_AXIS_DRIVE_ENABLE', 'ELEVATION_AXIS_HOME', 'AZIMUTH_CABLE_WRAP_RESET_ALARM', 'MIRROR_COVERS_CLOSE', 'LOCKING_PINS_STOP', 'CABINET_TRACK_AMBIENT', 'ENCODER_INTERFACE_BOX_CLEAR_POSITION_ERROR', 'TOP_END_CHILLER_RESET_ALARM', 'AZIMUTH_THERMAL_POWER', 'CAMERA_CABLE_WRAP_STOP', 'LOCKING_PINS_MOVE_VELOCITY', 'AZIMUTH_AXIS_ENABLE_TRACKING', 'TRACK_TARGET', 'ENCODER_INTERFACE_BOX_RESET_ERROR'}
end_tai_unix

Get the end time of the current path, as TAI unix seconds.

Methods Documentation

add_methods()

Add do_methods to the command dict

assert_enabled()

Raise RuntimeError if the drive is not enabled.

assert_tracking_enabled(enabled)

Raise RuntimeError if tracking is or is not enabled.

close()
do_drive_enable(command)

Enable or disable the drive.

do_drive_reset(command)

Reset the drive.

do_enable_tracking(command)

Enable or disable tracking mode.

do_home(command)

Home the actuator.

For sake of doing something vaguely plausible, move to the mid-point of the position limits.

do_move(command)

Set target position.

Velocity and acceleration limits are not applied, because it is tricky to make sure the values are correctly restored when the move finishes, and the CSC doesn’t support these parameters anyway.

do_move_velocity(command)
do_power(command)
do_reset_alarm(command)
do_stop(command)

Stop the actuator.

do_track(command)

Specify a tracking target tai_time, position, velocity.

monitor_move_command(command)

Monitor motion and report a move command as done.

supersede_move_command()

Report the current move command (if any) as superseded.