ATCS#
- class lsst.ts.observatory.control.auxtel.ATCS(domain=None, log=None, intended_usage=None)#
Bases:
BaseTCSHigh level library for the Auxiliary Telescope Control System
This is the high level interface for interacting with the CSCs that control the Auxiliary Telescope. Essentially this will allow the user to slew and track the telescope.
- Parameters:
domain (
salobj.Domain) – Domain to use of the Remotes. IfNone, create a new domain.log (
logging.Logger) – Optional logging class to be used for logging operations. IfNone, creates a new logger. Useful to use in salobj.BaseScript and allow logging in the class use the script logging.intended_usage (
int) – Optional integer that maps to a list of intended operations. This is used to limit the resources allocated by the class by gathering some knowledge about the usage intention. By default allocates all resources.
- atmcs#
- Type:
salobj.Remote
- ataos#
- Type:
salobj.Remote
- atpneumatics#
- Type:
salobj.Remote
- athexapod#
- Type:
salobj.Remote
- atdome#
- Type:
salobj.Remote
- atdometrajectory#
- Type:
salobj.Remote
- check#
- Type:
SimpleNamespace
- log#
- Type:
Attributes Summary
Return CoordFrame enumeration.
Return RotFrame enumeration.
Return RotMode enumeration.
Return WrapStrategy enumeration
Return name of the DomeTrajectory component.
Plate scale in mm/arcsec.
Return name of the pointing component.
Define class usages.
Returns valid usages.
Methods Summary
Assert that m1, hexapod and atspectrograph corrections are enabled.
assert_m1_correction_disabled([message])Assert that m1 corrections is disabled.
Check that all ATAOS corrections completed.
Check if atmcs is in position.
atmcs_target_callback(data)Callback function to update the telescope target event topic.
Check the targeting status of the atmcs.
close_dome([force])Task to close ATDome.
Close ATDome dropout door
Task to close m1 cover.
Task to open m1 vents.
disable_ataos_corrections([ignore_fail])Disable ATAOS corrections.
Enable ATAOS corrections.
Enable monitor.
Implement abstract method to flush events before an offset is performed.
focus_offset(offset)Apply focus offset.
Get the instrument bore sight angle with respect to the telescope axis.
Get selected nasmyth angle.
home_dome([force])Task to execute dome home command and wait for it to complete.
Check if ATMCS is in operational range for pneumatics operation.
Verify if the dome is homed.
Is monitor position flag enabled?
monitor_position([check])Monitor and log the position of the telescope and the dome.
Callback function to update the telescope position telemetry topic.
next_telescope_position([timeout])Wait for next telescope position to become available and return data.
next_telescope_target([timeout])Wait for next telescope position to become available and return data.
offset_aos_lut([z, x, y, u, v, m1, ...])Apply offsets to hexapod and optionally re-center telescope after hexapod offset.
Wait for events specifying that an offset completed.
Task to open dome shutter and return when it is done.
Open ATdome dropout door.
Task to open m1 cover.
Task to open m1 vents.
Open ATPneumatics instrument valve.
Open ATPneumatics main valve.
Open the air valve system on ATPneumatics.
prepare_for_flatfield([check])A high level method to position the telescope and dome for flat field operations.
prepare_for_onsky([overrides])Prepare Auxiliary Telescope for on-sky operations.
prepare_for_vent([partially_open_dome])Prepare Auxiliary Telescope for venting.
set_azel_slew_checks(wait_dome)Handle azEl slew to wait or not for the dome.
shutdown()Shutdown ATTCS components.
slew_dome_to(az[, check, timeout])Utility method to slew dome to a specified position.
Slew the telescope to safe range for pneumatics operation.
stop_all()Stop telescope and dome.
Stop all dome motion.
Stop any monitor position.
Task to stop telescope tracking.
wait_for_atdome_inposition(timeout)Wait until the telescope is cleared by the dome.
Wait for the atdome shutter to be in position.
wait_for_atmcs_inposition(timeout)Wait for inPosition of atmcs to be ready.
wait_for_inposition(timeout, wait_settle[, ...])Wait for both the ATMCS and ATDome to be in position.
Attributes Documentation
- CoordFrame#
Return CoordFrame enumeration.
- RotFrame#
Return RotFrame enumeration.
- RotMode#
Return RotMode enumeration.
- WrapStrategy#
Return WrapStrategy enumeration
- dome_trajectory_name#
Return name of the DomeTrajectory component.
- plate_scale#
Plate scale in mm/arcsec.
- ptg_name#
Return name of the pointing component.
- telescope_position#
- telescope_target#
- usages#
- valid_use_cases#
Returns valid usages.
When subclassing, overwrite this method to return the proper enum.
- Returns:
usages
- Return type:
enum
Methods Documentation
- async assert_ataos_corrections_enabled()#
Assert that m1, hexapod and atspectrograph corrections are enabled.
- Raises:
AssertionError – If ATAOS m1, hexapod, or atspectrograph corrections are disabled.
- Return type:
- async assert_m1_correction_disabled(message='')#
Assert that m1 corrections is disabled.
- Parameters:
message (
str) – Additional message to append to error.- Raises:
AssertionError – If ATAOS m1 corrections are enabled.
- Return type:
- async ataos_corrections_completed()#
Check that all ATAOS corrections completed.
- Returns:
corrections_completed – Returns
Truewhen corrections are completed.- Return type:
- Raises:
RuntimeError: – If the last
atspectrographCorrectionCompletedevent was published before the lastatspectrographCorrectionStartedand a timeout happens when waiting for a newatspectrographCorrectionCompleted.
- async atmcs_in_position()#
Check if atmcs is in position.
This method will try to get the next event published after the call. If it fails, it will return the last event seen. If no event was ever seen, it will fail with a
TimeoutError.- Returns:
in_position – In position flag value.
- Return type:
- async atmcs_target_callback(data)#
Callback function to update the telescope target event topic.
- Parameters:
data (
BaseMsgType)- Return type:
- async close_dome(force=True)#
Task to close ATDome.
- async close_m1_cover()#
Task to close m1 cover. :rtype:
NoneWarning
The Mirror cover can only be closed if the telescope is pointing above
self.tel_el_operate_pneumatics(=70 degrees). The method will check if the telescope is in an operational range and, if not, will move the telescope to an operational elevation, maintaining the same azimuth before closing the mirror cover. The telescope will be left in that same position in the end.
- async disable_ataos_corrections(ignore_fail=True)#
Disable ATAOS corrections.
- flush_offset_events()#
Implement abstract method to flush events before an offset is performed. :rtype:
NoneSee also
offset_doneWait for events that mark an offset as completed.
offset_azelOffset in local AzEl coordinates.
offset_xyOffset in terms of boresight.
offset_radecOffset in sky coordinates.
- async focus_offset(offset)#
Apply focus offset.
Returns after offset is aplied.
- async get_bore_sight_angle()#
Get the instrument bore sight angle with respect to the telescope axis.
This method also determines the parity of the x-axis based on the currently selected focus.
- Returns:
angle – Bore sight angle.
- Return type:
- async get_selected_nasmyth_angle()#
Get selected nasmyth angle.
Check which nasmyth port is selected and return its current position. If it cannot determine the current nasmyth, issue a warning and uses port 2, if
self.parity_x == -1, or port 1, otherwise.- Returns:
nasmyth_angle – Calculated angle of the current selected nasmyth port.
- Return type:
- Raises:
RuntimeError: – If cannot get mount_Nasmyth_Encoders.
- async home_dome(force=False)#
Task to execute dome home command and wait for it to complete.
- async in_pneumatics_operational_range()#
Check if ATMCS is in operational range for pneumatics operation.
- async is_dome_homed()#
Verify if the dome is homed.
- async monitor_position(check=None)#
Monitor and log the position of the telescope and the dome.
- Parameters:
check (
types.SimpleNamespaceorNone) – Overrideself.checkfor defining which resources are used.- Return type:
- async mount_AzEl_Encoders_callback(data)#
Callback function to update the telescope position telemetry topic.
- Parameters:
data (
BaseMsgType)- Return type:
- async next_telescope_position(timeout=None)#
Wait for next telescope position to become available and return data.
- Parameters:
timeout (
float) – How long to wait for target to arrive (in seconds). Default isNone, which means, wait for ever.- Returns:
data
- Return type:
ATMCS_tel_mount_AzEl_Encoders- Raises:
asyncio.TimeoutError – If no new data is seen in less then
timeoutseconds.
- async next_telescope_target(timeout=None)#
Wait for next telescope position to become available and return data.
- Parameters:
timeout (
float) – How long to wait for target to arrive (in seconds). Default isNone, which means, wait for ever.- Returns:
data
- Return type:
ATMCS_tel_mount_AzEl_Encoders- Raises:
asyncio.TimeoutError – If no new data is seen in less then
timeoutseconds.
- async offset_aos_lut(z=0.0, x=0.0, y=0.0, u=0.0, v=0.0, m1=0.0, offset_telescope=True)#
Apply offsets to hexapod and optionally re-center telescope after hexapod offset.
- Parameters:
z (
float, optional) – Hexapod offset in z axis (mm)x (
float, optional) – Hexapod offset in x axis (mm)y (
float, optional) – Hexapod offset in y axis (mm)u (
float, optional) – Hexapod Rx offset (deg)v (
float, optional) – Hexapod Ry offset (deg)m1 (
float, optional) – M1 pressure offset (Pa). Must be less than 0.offset_telescope (
bool, optional) – Offset the telescope after the hexpod offset to compensate for chage in pointing.
- Return type:
- async offset_done()#
Wait for events specifying that an offset completed.
- Return type:
Notes
For ATMCS we expect the component to send
allAxesInPosition.inPosition=Falseat the start of an offset and thenallAxesInPosition.inPosition=Truewhen it is done.If the ATMCS fails to send these events in more than
self.tel_settle_timeseconds, waiting for the event will timeout and raise anasyncio.Timeoutexception.See also
flush_offset_eventsFlush events before an offset.
offset_azelOffset in local AzEl coordinates.
offset_xyOffset in terms of boresight.
offset_radecOffset in sky coordinates.
- async open_m1_cover()#
Task to open m1 cover. :rtype:
NoneWarning
The Mirror cover can only be opened if the telescope is pointing above
self.tel_el_operate_pneumatics(=70 degrees). The method will check if the telescope is in an operational range and, if not, will move the telescope to an operational elevation, maintaining the same azimuth before opening the mirror cover. The telescope will be left in that same position in the end.
- async prepare_for_flatfield(check=None)#
A high level method to position the telescope and dome for flat field operations.
The method will,
1 - disable ATDomeTrajectory 2 - close the dome shutter (if open) 3 - send telescope to flat field position 4 - send dome to flat field position 5 - re-enable ATDomeTrajectory
- Parameters:
check (
types.SimpleNamespaceorNone) – Overrideself.checkfor defining which resources are used.- Return type:
- async prepare_for_onsky(overrides=None)#
Prepare Auxiliary Telescope for on-sky operations.
This method will perform the start of the night procedure for the ATCS component. It will enable all components, open the dome slit, open the telescope covers and activate AOS open loop corrections.
- async prepare_for_vent(partially_open_dome=False)#
Prepare Auxiliary Telescope for venting.
- set_azel_slew_checks(wait_dome)#
Handle azEl slew to wait or not for the dome.
- Parameters:
wait_dome (
bool) – Should the slew wait for the dome?- Returns:
check – Reformated check namespace.
- Return type:
- async shutdown()#
Shutdown ATTCS components.
This method will perform the end of the night procedure for the ATTCS component. It will close the telescope cover, close the dome, move the telescope and dome to the park position and disable all components.
- Return type:
- async slew_dome_to(az, check=None, *, timeout=None)#
Utility method to slew dome to a specified position.
This method works at cross purposes to ATDomeTrajectory, so this method disables ATDomeTrajectory and leaves it disabled. If ATDomeTrajectory is enabled while the dome is slewing to the requested position this method raises an exception.
The method will return once the dome arrives in position, at which point all checks will be canceled before returning.
- Parameters:
check (
types.SimpleNamespaceorNone) – Overrideself.checkfor defining which resources are used.timeout (
float, optional) – How long to wait for dome to arrive in position. Defaults toself.long_long_timeoutif not provided.
- Raises:
RuntimeError: – If ATDome is ENABLED while slewing the dome.
- Return type:
- async slew_to_pneumatics_operational_range()#
Slew the telescope to safe range for pneumatics operation.
This method will slew the telescope to a safe elevation to perform atpneumatics operations. It should be used in combination with the in_pneumatics_operational_range method. Telescope will be left in pneumatics position with tracking disabled.
- Return type:
- async wait_for_atdome_inposition(timeout)#
Wait until the telescope is cleared by the dome.
Instead of waiting until the dome finishes moving. This method will wait until the telescope is not vigneted by the dome. This is monitored in
monitor_positionand broadcasted as anasyncio.Event.- Parameters:
timeout (
float) – How long should it wait before timing out.- Returns:
status – String with final status.
- Return type:
- Raises:
asyncio.TimeoutError – If does not get a status update in less then
timeoutseconds.
- async wait_for_atdome_shutter_inposition()#
Wait for the atdome shutter to be in position.
- Returns:
status – String with final status.
- Return type:
- Raises:
asyncio.TimeoutError – If does not get in position before
self.open_dome_shutter_time
- async wait_for_atmcs_inposition(timeout)#
Wait for inPosition of atmcs to be ready.
- Parameters:
timeout (
float) – How long should it wait before timing out.- Returns:
status – String with final status.
- Return type:
- Raises:
asyncio.TimeoutError – If does not get a status update in less then
timeoutseconds.
- async wait_for_inposition(timeout, wait_settle, check=None)#
Wait for both the ATMCS and ATDome to be in position.
- Parameters:
timeout (
float) – How long should it wait before timing out.cmd_ack (
CmdAckorNone) – CmdAck from the command that started the slew process. This is an experimental feature to discard events that where sent before the slew starts.wait_settle (
bool) – After slew completes, add an addional settle wait before returning.check (
types.SimpleNamespaceorNone) – Overrideself.checkfor defining which resources are used.
- Returns:
status – String with final status.
- Return type:
- Raises:
RuntimeError: – If tasks times out.