MTCS

class lsst.ts.observatory.control.maintel.MTCS(domain: Optional[Domain] = None, log: Optional[Logger] = None, intended_usage: Optional[int] = None)

Bases: BaseTCS

High level library for the Main Telescope Control System

This is the high level interface for interacting with the CSCs that control the Main Telescope. Essentially this will allow the user to slew and track the telescope.

This is a placeholder for the Main Telescope Class.

Parameters:
domain: `salobj.Domain`

Domain to use of the Remotes. If None, create a new domain.

Attributes Summary

CoordFrame

Return CoordFrame enumeration.

RotFrame

Return RotFrame enumeration.

RotMode

Return RotMode enumeration.

WrapStrategy

Return WrapStrategy enumeration

compensation_mode_components

Set with the name of the components that support compensation mode.

components

List of components names.

components_attr

List of remotes names.

dome_trajectory_name

Return name of the DomeTrajectory component.

instrument_focus

m1m3_engineering_states

M1M3 engineering states.

plate_scale

Plate scale in mm/arcsec.

ptg_name

Return name of the pointing component.

usages

Define class usages.

valid_use_cases

Returns valid usages.

Methods Summary

abort_raise_m1m3()

Abort a raise m1m3 operation.

add_point_data()

Add current position to a point file.

assert_all_enabled([message])

Check if all components are in the enabled state.

assert_has_compensation_mode(component)

Assert that component is part of the set of components that supports compensation mode.

assert_liveliness()

Assert liveliness of components belonging to the group.

assert_m1m3_detailed_state(detailed_states)

Assert that M1M3 detailed state is one of the input set.

azel_from_radec(ra, dec[, time])

Calculate Az/El coordinates from RA/Dec in ICRS.

cancel_not_done(tasks)

Cancel all coroutines in coro_list.

check_comp_heartbeat(component)

Monitor heartbeats from the specified component and raises and exception if not.

check_component_state(component[, desired_state])

Monitor the summary state of a component and raises an exception if it is or goes to a state different than the desired state.

check_dome_following()

Check if dome following is enabled.

check_tracking([track_duration])

Check tracking state.

clear_catalog()

Clear internal catalog.

close()

close_dome()

Task to close dome.

close_m1_cover()

Task to close m1 cover.

close_m1m3_booster_valve()

Close M1M3 booster valves.

components_to_check()

Return components for which check is enabled.

disable_ccw_following()

Disable camera cable wrap following the rotator.

disable_compensation_mode(component)

Disable compensation mode for one of the hexapods.

disable_dome_following([check])

Disable dome following mode.

disable_m1m3_balance_system()

Disable m1m3 balance system.

dome_az_in_position()

Wait for _dome_az_in_position event to be set and return a string indicating the dome azimuth is in position.

dome_el_in_position()

Wait for _dome_el_in_position event to be set and return a string indicating the dome elevation is in position.

enable([overrides])

Enable all components.

enable_ccw_following()

Enable camera cable wrap following the rotator.

enable_compensation_mode(component)

Enable compensation mode for one of the hexapods.

enable_dome_following([check])

Enabled dome following mode.

enable_m1m3_balance_system()

Enable m1m3 balance system.

enable_m2_balance_system()

Enable m2 balance system.

enter_m1m3_engineering_mode()

Enter M1M3 engineering mode.

exit_m1m3_engineering_mode()

Exit M1M3 engineering mode.

expand_overrides([overrides])

Expand an overrides dict with entries for every component.

find_target(az, el, mag_limit[, mag_range, ...])

Make a cone search and return a target close to the specified position.

find_target_dm_butler(az, el, mag_limit[, ...])

Make a cone search in the butler source catalog and return a target in the magnitude range, close to the specified position.

find_target_local_catalog(az, el, mag_limit)

Make a cone search in the internal catalog and return a target in the magnitude range, close to the specified position.

find_target_simbad(az, el, mag_limit[, ...])

Make a cone search in the HD catalog using Simbad and return a target with magnitude inside the magnitude range, close to the specified position.

flush_offset_events()

Abstract method to flush events before and offset is performed.

get_bore_sight_angle()

Get the instrument bore sight angle with respect to the telescope axis.

get_compensation_mode_camera_hexapod()

Return the last sample of compensationMode event from camera hexapod.

get_compensation_mode_m2_hexapod()

Return the last sample of compensationMode event from m2 hexapod.

get_heartbeat(component)

Get last heartbeat for component.

get_identity()

Get user identity.

get_m1m3_actuator_ids()

Get a list of the M1M3 actuator ids.

get_m1m3_actuator_index(actuator_id)

Convert from actuator_id into actuator index using M1M3 FATable.

get_m1m3_actuator_secondary_ids()

Get a list of the M1M3 actuator secondary ids.

get_m1m3_actuator_secondary_index(actuator_id)

Convert from actuator_id into actuator secondary index using M1M3 FATable.

get_m1m3_applied_balance_forces()

Returns the last sample of appliedBalanceForces data from m1m3.

get_m1m3_bump_test_status(actuator_id)

Get latest m1m3 bump test status.

get_m1m3_slew_controller_settings()

Retrieve the current M1M3 slew controller settings.

get_m2_hardpoints()

Retrieve the current list of M2 hardpoints.

get_required_resources(component, intended_usage)

Return the required resources based on the intended usage of the class.

get_rot_angle_alternatives(rot_angle)

Generate rotator angle alternatives based on the input rotator angle.

get_simulation_mode([components])

Return a list with the simulation mode for components in the group.

get_software_versions([components])

Return a list with the software versions for components in the group.

get_state(component[, ignore_timeout])

Get summary state for component.

get_sun_azel([time_tai])

Get the sun azimuth and elevation.

get_telescope_and_dome_vent_azimuth()

Get the telescope and dome vent azimuth.

get_work_components([components])

Parse input into a list of valid components from the group.

handle_request_authorization(...)

Handle requesting authorization.

home_dome()

Task to execute dome home command and wait for it to complete.

is_catalog_loaded()

Check if catalog is loaded.

is_m1m3_in_engineering_mode()

Check if M1M3 is in engineering mode.

list_available_catalogs()

List of available catalogs to load.

load_catalog(catalog_name)

Load a catalog from the available set.

lower_m1m3()

Lower M1M3.

m1m3_booster_valve()

Context manager to handle opening/closing M1M3 booster valves.

map_slew_setting_to_attribute(setting_enum)

Maps a SetSlewControllerSettings enum to the corresponding attribute returned by the evt_slew_controller_settings.

monitor_position([check])

Monitor MTCS axis position.

move_camera_hexapod(x, y, z, u, v[, w, sync])

Move camera hexapod.

move_m2_hexapod(x, y, z, u, v[, w, sync])

Move m2 hexapod.

move_p2p_azel(az, el[, timeout])

Move telescope using point to point mode.

move_p2p_radec(ra, dec[, timeout])

Move telescope using point to point mode.

move_rotator(position[, wait_for_in_position])

Move rotator to specified position and wait for movement to complete.

next_heartbeat(component)

Get next heartbeat for component.

next_m1m3_applied_balance_forces(flush)

Returns the next sample of appliedBalanceForces data from m1m3.

next_state(component)

Get summary state for component.

object_list_add(name, radec)

Add object to object list.

object_list_clear()

Remove all objects stored in the internal object list.

object_list_get(name)

Get an object from the list or query Simbad and return it.

object_list_get_all()

Return list of objects in the object list.

object_list_remove(name)

Remove object from object list.

offline()

Put all CSCs in offline.

offset_azel(az, el[, relative, persistent, ...])

Offset telescope in azimuth and elevation.

offset_camera_hexapod(x, y, z, u, v[, w, sync])

Offset camera hexapod.

offset_done()

Wait for offset events.

offset_m2_hexapod(x, y, z, u, v[, w, sync])

Offset M2 hexapod.

offset_pa(angle, radius)

Offset the telescope based on a position angle and radius.

offset_radec(ra, dec)

Offset telescope in RA and Dec.

offset_rot(rot)

Apply a rotation offset.

offset_xy(x, y[, relative, persistent, absorb])

Offsets in the detector X/Y plane.

open_dome_shutter()

Task to open dome shutter and return when it is done.

open_m1_cover()

Task to open m1 cover.

open_m1m3_booster_valve()

Open M1M3 booster valves.

parallactic_angle(ra, dec[, time])

Return parallactic angle for the given Ra/Dec coordinates.

point_azel(az, el[, rot_tel, target_name, ...])

Slew the telescope to a fixed alt/az position.

prepare_for_flatfield([check])

A high level method to position the telescope and dome for flat field operations.

prepare_for_onsky([overrides])

Prepare telescope for on-sky operations.

process_as_completed(tasks)

Process tasks are they complete.

radec_from_azel(az, el[, time])

Calculate Ra/Dec in ICRS coordinates from Az/El.

raise_m1m3()

Raise M1M3.

ready_to_take_data()

Wait for the telescope control system to be ready to take data.

release_authorization()

Release authorization to command all required components from the group.

request_authorization()

Request authorization to command all required components from the group.

reset_camera_hexapod_position()

Reset position of the camera hexapod.

reset_checks()

Reset all checks, enabling check for all components.

reset_m1m3_forces()

Reset M1M3 forces.

reset_m2_forces()

Reset M2 forces.

reset_m2_hexapod_position()

Reset position of the M2 hexapod.

reset_offsets([absorbed, non_absorbed])

Reset pointing offsets.

rotation_matrix(angle)

Rotation matrix.

run_m1m3_actuator_bump_test(actuator_id[, ...])

M1M3 actuator bump test.

run_m1m3_hard_point_test(hp)

Test an M1M3 hard point.

run_m2_actuator_bump_test(actuator, force[, ...])

M2 actuator bump test.

set_azel_slew_checks(wait_dome)

Handle azEl slew to wait or not for the dome.

set_m1m3_slew_controller_settings(...)

Set a specific M1M3 slew controller setting based on the provided enumeration.

set_rem_loglevel(level)

Set remotes log level.

set_rot_angle_alternatives(...)

Set the rotator angle alternatives.

set_state(state[, overrides, components])

Set summary state for all components.

shutdown()

Shutdown components.

slew(ra, dec[, rotPA, target_name, frame, ...])

Slew the telescope and start tracking an Ra/Dec target.

slew_dome_to(az[, check])

Utility method to slew dome to a specified position.

slew_ephem_target(ephem_file, target_name[, ...])

Slew the telescope to a target defined by ephemeris data defined in a file.

slew_icrs(ra, dec[, rot, rot_type, ...])

Slew the telescope and start tracking an Ra/Dec target in ICRS coordinate frame.

slew_object(name[, rot, rot_type, dra, ...])

Slew to an object name.

slew_to_planet(planet[, rot_sky, slew_timeout])

Slew and track a solar system body.

standby()

Put all CSCs in standby.

start_tracking()

Start tracking the current position of the telescope.

stop_all()

Stop telescope and dome.

stop_m1m3_bump_test()

Stop bump test.

stop_m1m3_hard_point_test(hp)

Interrupt hard point test.

stop_m2_bump_test()

Stop the M2 actuator bump test.

stop_rotator()

Stop rotator movement and wait for controller to publish Stationary substate event.

stop_tracking()

Task to stop telescope tracking.

wait_for_dome_inposition(timeout[, wait_settle])

Wait for the Dome to be in position.

wait_for_inposition(timeout[, wait_settle, ...])

Wait for Mount, Dome and Rotator to be in position.

wait_for_mtmount_inposition(timeout[, ...])

Wait for the MTMount inPosition event.

wait_for_rotator_inposition(timeout[, ...])

Wait for the Rotator inPosition event.

wait_m1m3_force_balance_system(timeout)

Wait for m1m3 force balance system to stabilize.

wait_m1m3_settle()

Wait until m1m3 has settle.

Attributes Documentation

CoordFrame

Return CoordFrame enumeration.

RotFrame

Return RotFrame enumeration.

RotMode

Return RotMode enumeration.

WrapStrategy

Return WrapStrategy enumeration

compensation_mode_components

Set with the name of the components that support compensation mode.

components

List of components names.

The name of the CSC follow the format used in the class constructor, e.g. CSCName or CSCName:index (for indexed components), e.g. “Hexapod:1” (for Hexapod with index=1) or “ATHexapod”.

Returns:
componentslist of str

List of CSCs names.

components_attr

List of remotes names.

The remotes names are reformatted to fit the requirements for object attributes. It will be the name of the CSC (as in components) in lowercase, replacing the colon by an underscore, e.g. “Hexapod:1” -> “hexapod_1” or “ATHexapod” -> “athexapod”.

Returns:
components_attrlist of str

List of remotes attribute names.

dome_trajectory_name

Return name of the DomeTrajectory component.

instrument_focus
m1m3_engineering_states

M1M3 engineering states.

Returns:
set`[ `MTM1M3.DetailedState ]

Set with the M1M3 detailed states.

plate_scale

Plate scale in mm/arcsec.

ptg_name

Return name of the pointing component.

usages
valid_use_cases

Returns valid usages.

Returns:
usages: enum

Methods Documentation

async abort_raise_m1m3() None

Abort a raise m1m3 operation.

async add_point_data() None

Add current position to a point file. If a file is open it will append to that file. If no file is opened it will open a new one.

async assert_all_enabled(message: str = '') None

Check if all components are in the enabled state.

Parameters:
message: `str`

Additional message to append to error.

assert_has_compensation_mode(component: str) None

Assert that component is part of the set of components that supports compensation mode.

Parameters:
componentstr

Name of the component

Raises:
AssertionError

If component does not support compensation mode or if it is not a valid MTCS component.

async assert_liveliness() None

Assert liveliness of components belonging to the group.

The assertion is done by waiting for a new heartbeat from the component. The check feature will apply to the assertion so components marked with check=False will be skipped.

Raises:
AssertionError

If cannot get heartbeat for one or more components.

async assert_m1m3_detailed_state(detailed_states: set[lsst.ts.xml.enums.MTM1M3.DetailedStates]) None

Assert that M1M3 detailed state is one of the input set.

azel_from_radec(ra: Union[float, str, Angle], dec: Union[float, str, Angle], time: Optional[Time] = None) AltAz

Calculate Az/El coordinates from RA/Dec in ICRS.

Parameters:
rafloat, str or astropy.coordinates.Angle

Target RA, either as a float (hour), a sexagesimal string (HH:MM:SS.S or HH MM SS.S) coordinates or astropy.coordinates.Angle.

decfloat, str or astropy.coordinates.Angle

Target Dec, either as a float (deg), a sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle.

timeastropy.time.core.Time or None, optional

The time which the coordinate trasformation is intended for. If None (default) use current time.

Returns:
azelastropy.coordinates.AltAz

Astropy coordinates with azimuth and elevation.

async static cancel_not_done(tasks: List[Task]) None

Cancel all coroutines in coro_list.

Remove futures from input tasks list and cancel them.

Parameters:
taskslist [futures]

A list of coroutines to cancel.

async check_comp_heartbeat(component: str) None

Monitor heartbeats from the specified component and raises and exception if not.

This method will run forever as long as the component continues to send heartbeats. The intention is that this can run alongside an operation, to make sure the component remains responsive.

Parameters:
componentstr

Name of the component to follow. The name of the CSC follow the format CSCName or CSCName:index (for indexed components), e.g. “Hexapod:1” (for Hexapod with index=1) or “ATHexapod”.

Raises:
RuntimeError

If the component does not send heartbeats in self.fast_timeout seconds.

async check_component_state(component: str, desired_state: State = State.ENABLED) None

Monitor the summary state of a component and raises an exception if it is or goes to a state different than the desired state.

This method will run forever as long as the summary state remains unchanged. The intention is that this can run alongside an operation that require the component to be in a certain state, when the operation is completed, the task can be canceled.

Parameters:
componentstr

Name of the component to follow. Must be one of: atmcs, atptg, ataos, atpneumatics, athexapod, atdome, atdometrajectory

desired_statesalobj.State

Desired state of the CSC.

Raises:
RuntimeError

If state is not desired_state.

KeyError

If component is not found.

async check_dome_following() bool

Check if dome following is enabled.

Returns:
dome_followingbool

True is enabled False otherwise.

async check_tracking(track_duration: Optional[float] = None) None

Check tracking state.

This method monitors all the required parameters for tracking a target; from telescope and pointing component to the dome.

If any of those conditions fails, raise an exception.

This method is useful in case an operation required tracking to be active and be interrupted in case tracking stops. One can start this method concurrently and monitor it for any exception. If an exception is raise, the concurrent task can be interrupted or marked as failed as appropriately.

If a track_duration is specified, the method will return after the time has passed. Otherwise it will just check forever.

Parameters:
track_durationfloat or None

How long should tracking be checked for (second)? Must be a positive float or None (default).

clear_catalog() None

Clear internal catalog.

async close() None
async close_dome() None

Task to close dome.

async close_m1_cover() None

Task to close m1 cover.

async close_m1m3_booster_valve() None

Close M1M3 booster valves.

components_to_check() List[str]

Return components for which check is enabled.

Returns:
list of str

Components to check.

async disable_ccw_following() None

Disable camera cable wrap following the rotator.

async disable_compensation_mode(component: str) None

Disable compensation mode for one of the hexapods.

Parameters:
componentstr

Name of the component

See also

enable_compensation_mode

Enable compensation mode.

compensation_mode_components

Set of components with compensation mode.

async disable_dome_following(check: Any = None) None

Disable dome following mode.

async disable_m1m3_balance_system() None

Disable m1m3 balance system.

async dome_az_in_position() str

Wait for _dome_az_in_position event to be set and return a string indicating the dome azimuth is in position.

async dome_el_in_position() str

Wait for _dome_el_in_position event to be set and return a string indicating the dome elevation is in position.

async enable(overrides: Optional[Dict[str, str]] = None) None

Enable all components.

This method will enable all group components. Users can provide overrides for the start command (in a dictionary).

Parameters:
overrides: `dict`

Dictionary with overrides to apply. If None use recommended overrides.

async enable_ccw_following() None

Enable camera cable wrap following the rotator.

async enable_compensation_mode(component: str) None

Enable compensation mode for one of the hexapods.

Parameters:
componentstr

Name of the component. Must be in compensation_mode_components.

See also

disable_compensation_mode

Disable compensation mode.

compensation_mode_components

Set of components with compensation mode.

async enable_dome_following(check: Any = None) None

Enabled dome following mode.

async enable_m1m3_balance_system() None

Enable m1m3 balance system.

async enable_m2_balance_system() None

Enable m2 balance system.

async enter_m1m3_engineering_mode() None

Enter M1M3 engineering mode.

async exit_m1m3_engineering_mode() None

Exit M1M3 engineering mode.

async expand_overrides(overrides: Optional[Dict[str, str]] = None) Dict[str, str]

Expand an overrides dict with entries for every component.

Any components that have no specified override are set to “”.

Parameters:
overridesdict or None

A dictionary with (component name, overrides) pair or None. The component name is as it appears in the components_attr attribute, which is the name of the CSC in lowercase, replacing “:” by “_” for indexed components, e.g. “Hexapod:1” -> “hexapod_1” or “ATHexapod” -> “athexapod”.

Returns:
complete_overridesdict

Dictionary with overrides for every component in the group. Unspecifies components have override “”.

Raises:
RuntimeError

If an item in the parameter overrides dictionary is not a CSC in the group.

async find_target(az: float, el: float, mag_limit: float, mag_range: float = 2.0, radius: float = 0.5) Table

Make a cone search and return a target close to the specified position.

Parameters:
az: `float`

Azimuth (in degrees).

el: `float`

Elevation (in degrees).

mag_limit: `float`

Minimum (brightest) V-magnitude limit.

mag_range: `float`, optional

Magnitude range. The maximum/faintest limit is defined as mag_limit+mag_range (default=2).

radius: `float`, optional

Radius of the cone search (default=2 degrees).

Returns:
targetastropy.Table

Target information.

async find_target_dm_butler(az: float, el: float, mag_limit: float, mag_range: float = 2.0, radius: float = 0.5) str

Make a cone search in the butler source catalog and return a target in the magnitude range, close to the specified position.

Parameters:
az: `float`

Azimuth (in degrees).

el: `float`

Elevation (in degrees).

mag_limit: `float`

Minimum (brightest) V-magnitude limit.

mag_range: `float`, optional

Magnitude range. The maximum/faintest limit is defined as mag_limit+mag_range (default=2).

radius: `float`, optional

Radius of the cone search (default=2 degrees).

Returns:
str

Name of the target.

Raises:
RuntimeError:

If DM stack is not available.

async find_target_local_catalog(az: float, el: float, mag_limit: float, mag_range: float = 2.0, radius: float = 0.5) str

Make a cone search in the internal catalog and return a target in the magnitude range, close to the specified position.

Parameters:
az: `float`

Azimuth (in degrees).

el: `float`

Elevation (in degrees).

mag_limit: `float`

Minimum (brightest) V-magnitude limit.

mag_range: `float`, optional

Magnitude range. The maximum/faintest limit is defined as mag_limit+mag_range (default=2).

radius: `float`, optional

Radius of the cone search (default=2 degrees).

Returns:
str

Name of the target.

Raises:
RuntimeError:

If catalog is not loaded. If no object is found.

async find_target_simbad(az: float, el: float, mag_limit: float, mag_range: float = 2.0, radius: float = 0.5) str

Make a cone search in the HD catalog using Simbad and return a target with magnitude inside the magnitude range, close to the specified position.

Parameters:
az: `float`

Azimuth (in degrees).

el: `float`

Elevation (in degrees).

mag_limit: `float`

Minimum (brightest) V-magnitude limit.

mag_range: `float`, optional

Magnitude range. The maximum/faintest limit is defined as mag_limit+mag_range (default=2).

radius: `float`, optional

Radius of the cone search (default=2 degrees).

Returns:
str

Name of the target.

Raises:
RuntimeError:

If no object is found.

flush_offset_events() None

Abstract method to flush events before and offset is performed.

async get_bore_sight_angle() float

Get the instrument bore sight angle with respect to the telescope axis.

async get_compensation_mode_camera_hexapod() BaseMsgType

Return the last sample of compensationMode event from camera hexapod.

Returns:
MTHexapod_logevent_compensationMode
async get_compensation_mode_m2_hexapod() BaseMsgType

Return the last sample of compensationMode event from m2 hexapod.

Returns:
MTHexapod_logevent_compensationMode
async get_heartbeat(component: str) BaseMsgType

Get last heartbeat for component.

Parameters:
componentstr

Name of the component.

Returns:
heartbeat

Last component heartbeat.

get_identity() str

Get user identity.

Returns:
str

Identity.

get_m1m3_actuator_ids() list[int]

Get a list of the M1M3 actuator ids.

Returns:
list`[ `int ]

List of M1M3 actuator ids.

get_m1m3_actuator_index(actuator_id: int) int

Convert from actuator_id into actuator index using M1M3 FATable.

Parameters:
actuator_idint

Actuator id.

Returns:
actuator_indexint

Array index of actuator.

Raises:
RuntimeError

If actuator_id is not valid.

See also

get_m1m3_actuator_secondary_index

Get m1m3 actuator secondary index from actuator secondary id.

get_m1m3_actuator_secondary_ids() list[int]

Get a list of the M1M3 actuator secondary ids.

Returns:
list`[ `int ]

List of M1M3 actuator secondary ids.

get_m1m3_actuator_secondary_index(actuator_id: int) int

Convert from actuator_id into actuator secondary index using M1M3 FATable.

Parameters:
actuator_idint

Actuator id.

Returns:
actuator_indexint

Secondary array index of actuator.

Raises:
RuntimeError

If actuator_id is not valid.

See also

get_m1m3_actuator_index

Get m1m3 actuator index from actuator id.

async get_m1m3_applied_balance_forces() BaseMsgType

Returns the last sample of appliedBalanceForces data from m1m3.

Returns:
MTM1M3_logevent_appliedBalanceForces or MTM1M3_appliedBalanceForces
async get_m1m3_bump_test_status(actuator_id: int) tuple[lsst.ts.xml.enums.MTM1M3.BumpTest, lsst.ts.xml.enums.MTM1M3.BumpTest | None]

Get latest m1m3 bump test status.

Parameters:
actuator_idint

Id of the actuator.

Returns:
primary_statusMTM1M3.BumpTest

Status of the primary (z-axis) test.

secondary_statusMTM1M3.BumpTest | None

Status of the secondary (xy-axis) test.

async get_m1m3_slew_controller_settings() dict

Retrieve the current M1M3 slew controller settings.

Returns:
dict

A dictionary containing the current settings, where the keys are the names used in the SetSlewControllerSettings enumeration.

Raises:
RuntimeError

If the expected attribute is not found in the event.

async get_m2_hardpoints() list[int]

Retrieve the current list of M2 hardpoints.

Returns:
list [ int ]

List of M2 hardpoints.

get_required_resources(component: str, intended_usage: Union[None, int]) Any

Return the required resources based on the intended usage of the class.

When subclassing, overwrite this method to add the child class use cases.

Parameters:
component: `str`

Name of the component, with index as it appears in components_attr attribute (e.g. test_1 for the Test component with index 1).

intended_usage: `int` or `None`

An integer constructed from the self.valid_use_cases. Usages can be combined to enable combined operations (see base class documentation). If None, returns appropriate values to load all resources.

Returns:
resources: types.SimpleNamespace

A simple namespaces with the following attributes:

add_this: bool

Should this remote be added to the collection?

readonly: bool

Create the remote for this component in readonly mode? Some operations does not require commanding.

include: list [str]

What topics should be included?

Raises:
KeyError: If component is not in the list of components.
get_rot_angle_alternatives(rot_angle: float) Generator[float, None, None]

Generate rotator angle alternatives based on the input rotator angle.

Parameters:
rot_anglefloat

Desired rotator angle (in deg).

Yields:
float

Rotator angle alternatives (in deg).

async get_simulation_mode(components: Optional[List[str]] = None) Dict[str, BaseMsgType]

Return a list with the simulation mode for components in the group.

Parameters:
componentslist of str, optional

List with the name of components to get the simulation mode. If None (default) return the values for all components.

Returns:
simulation_mode: dict

Dictionary with the name of the component and the value of simulation mode.

async get_software_versions(components: Optional[List[str]] = None) Dict[str, BaseMsgType]

Return a list with the software versions for components in the group.

Parameters:
componentslist of str, optional

List with the name of components to get the software versions. If None (default) return the values for all components.

Returns:
software_versions: dict

Dictionary with the name of the component and the value of software versions.

async get_state(component: str, ignore_timeout: bool = False) State

Get summary state for component.

Parameters:
componentstr

Name of the component.

ignore_timeoutbool

If True will return None in case it times out getting the state. Default is False, which means raise TimeoutError.

Returns:
statesalobj.State or None

Current state of component.

Raises:
asyncio.TimeoutError

If can not get state in self.fast_timeout seconds.

get_sun_azel(time_tai: float | None = None) tuple[float, float]

Get the sun azimuth and elevation.

Parameters:
time_taifloat or None, optional

TAI timestamp to get sun position. If None compute current tai.

Returns:
tuple`[`float, float]

Sun elevation and azimuth in degrees.

get_telescope_and_dome_vent_azimuth() tuple[float, float]

Get the telescope and dome vent azimuth.

Returns:
tel_vent_azimuthfloat

Azimuth to vent the telescope (in deg).

dome_vent_azimuthfloat

Azimuth to vent the dome (in deg).

get_work_components(components: Optional[List[str]] = None) List[str]

Parse input into a list of valid components from the group.

Parameters:
componentslist of str or None

Input list of components to process or None. If None return a list with all components.

Returns:
work_componentslist of str

List of valid components.

Raises:
RuntimeError

If a component in the components input list is not part of the group.

async handle_request_authorization(authorized_users: str, non_authorized_cscs: str) None

Handle requesting authorization.

Parameters:
authorized_usersstr

Comma separated list of users to request authorization to command the CSCs in this group, in the form user@host.

non_authorized_cscsstr

Comma separated list of CSC’s to deny authorization to command CSCs in this group, in the form name[:index].

async home_dome() None

Task to execute dome home command and wait for it to complete.

is_catalog_loaded() bool

Check if catalog is loaded.

Returns:
bool

True if catalog was loaded, False otherwise.

async is_m1m3_in_engineering_mode() bool

Check if M1M3 is in engineering mode.

Returns:
bool

True if M1M3 in engineering mode, False otherwise.

list_available_catalogs() Set[str]

List of available catalogs to load.

Returns:
catalog_namesset

Set with the names of the available catalogs.

See also

load_catalog

Load a catalog from the available set.

load_catalog(catalog_name: str) None

Load a catalog from the available set.

Parameters:
catalog_namestr

Name of the catalog to load. Must be a valid entry in the list of available catalogs.

Raises:
RuntimeError

If input catalog_name is not a valid entry in the list of available catalogs. If catalog was already loaded or not cleared before loading a new one.

See also

list_available_catalogs

List available catalogs to load.

async lower_m1m3() None

Lower M1M3.

m1m3_booster_valve() AsyncIterator[None]

Context manager to handle opening/closing M1M3 booster valves.

map_slew_setting_to_attribute(setting_enum: SetSlewControllerSettings) str

Maps a SetSlewControllerSettings enum to the corresponding attribute returned by the evt_slew_controller_settings.

Parameters:
setting_enumMTM1M3.SetSlewControllerSettings

The enum member to be mapped.

Returns:
str

The corresponding attribute name.

async monitor_position(check: Optional[Any] = None) None

Monitor MTCS axis position.

Monitor/log a selected set of axis from the main telescope. This is useful during slew activities to make sure everything is going as expected.

Parameters:
checktypes.SimpleNamespace or None

Override self.check for defining which resources are used.

async move_camera_hexapod(x: float, y: float, z: float, u: float, v: float, w: float = 0.0, sync: bool = True) None

Move camera hexapod.

When the camera hexapod compensation mode is on, move it to a new position relative to the LUT. When the camera hexapod compensation mode is off, move it to a new absolute position.

Parameters:
xfloat

Hexapod-x position (microns).

yfloat

Hexapod-y position (microns).

zfloat

Hexapod-z position (microns).

ufloat

Hexapod-u angle (degrees).

vfloat

Hexapod-v angle (degrees).

wfloat, optional

Hexapod-w angle (degrees). Default 0.

syncbool, optional

Should the hexapod movement be synchronized? Default True.

async move_m2_hexapod(x: float, y: float, z: float, u: float, v: float, w: float = 0.0, sync: bool = True) None

Move m2 hexapod.

When the m2 hexapod compensation mode is on, move it to a new position relative to the LUT. When the m2 hexapod compensation mode is off, move it to a new absolute position.

Parameters:
xfloat

Hexapod-x position (microns).

yfloat

Hexapod-y position (microns).

zfloat

Hexapod-z position (microns).

ufloat

Hexapod-u angle (degrees).

vfloat

Hexapod-v angle (degrees).

wfloat, optional

Hexapod-w angle (degrees). Default 0.

syncbool, optional

Should the hexapod movement be synchronized? Default True.

async move_p2p_azel(az: float, el: float, timeout: float = 120.0) None

Move telescope using point to point mode.

Parameters:
azfloat

Azimuth (in deg).

elfloat

Elevation (in deg).

timeoutfloat, optional

Timeout for positioning the telescope, by default=120.0 (in seconds).

async move_p2p_radec(ra: float, dec: float, timeout: float = 120.0) None

Move telescope using point to point mode.

Telescope will not track after getting in position.

Parameters:
rafloat

Desired right ascension (in hours).

decfloat

Desired declination (in deg).

timeoutfloat, optional

Timeout for positioning the telescope, by default 120.0 (in seconds)

async move_rotator(position: float, wait_for_in_position: bool = True) None

Move rotator to specified position and wait for movement to complete.

Parameters:
positionfloat

Desired rotator position (deg).

wait_for_in_positionbool, optional

Wait for rotator to reach desired position before returning the function? Default True.

async next_heartbeat(component: str) BaseMsgType

Get next heartbeat for component.

Parameters:
componentstr

Name of the component.

Returns:
heartbeat

Last component heartbeat.

async next_m1m3_applied_balance_forces(flush: bool) BaseMsgType

Returns the next sample of appliedBalanceForces data from m1m3.

Parameters:
flushbool

Flush the topic queue before getting the next sample?

Returns:
MTM1M3_logevent_appliedBalanceForces or MTM1M3_appliedBalanceForces
async next_state(component: str) State

Get summary state for component.

Parameters:
componentstr

Name of the component.

Returns:
statesalobj.State

Current state of component.

object_list_add(name: str, radec: ICRS) None

Add object to object list.

Parameters:
name: `str`

Name of the object.

object_table: `astropy.table.row.Row`

Table row with object information.

object_list_clear() None

Remove all objects stored in the internal object list.

object_list_get(name: str) ICRS

Get an object from the list or query Simbad and return it.

Parameters:
name: `str`

Name of the object.

Returns:
radec: ICRS

Table row with object information.

object_list_get_all() Set[str]

Return list of objects in the object list.

Returns:
object_list_namesset

Set with the names of all targets in the object list.

object_list_remove(name: str) None

Remove object from object list.

Parameters:
name: `str`

Object name.

Raises:
RuntimeError

If input object name not in the object list.

async offline() None

Put all CSCs in offline.

async offset_azel(az: float, el: float, relative: bool = True, persistent: Optional[bool] = None, absorb: bool = False) None

Offset telescope in azimuth and elevation.

For more information see the Notes section below or the package documentation in https://ts-observatory-control.lsst.io/.

Parameters:
azfloat

Offset in azimuth (arcsec).

elfloat

Offset in elevation (arcsec).

relativebool, optional

If True (default) offset is applied relative to the current position, if False offset replaces any existing offsets.

persistentbool or None, optional (deprecated)

(Deprecated) Should the offset be absorbed and persisted between slews? Use of this parameter is deprecated. Use absorb instead.

absorbbool, optional

Should the offset be absorbed and persisted between slews? (default: False)

See also

offset_xy

Offsets in the detector X/Y plane.

offset_radec

Offset in sky coordinates.

reset_offsets

Reset offsets.

Notes

The persistent flag is deprecated. Use absorb instead.

There are a couple different ways users can modify how offsets are treated via the input flags relative and absorb.

These flags allows users to control the following behavior;

1 - If the offset is relative to the current position

(relative=True) or relative to the pointing origin (e.g. the initial slew position).

2 - If the offset will only apply only to the current target

(absorb=False) or if they will be absorbed by the pointing and persist after a new targets (absorb=True).

By default relative=True and absorb=False, which means offsets will be relative to the current position and will reset after a slew.

The default relative offsets will accumulate. For instance,

>>> await tcs.offset_azel(az=10, el=0)
>>> await tcs.offset_azel(az=0, el=10)

Will result in a 10 arcsec offset in both azimuth and elevation.

Non-relative offsets will overrides any previous non-relative offset. For instance, the pair of commands below:

>>> await tcs.offset_azel(az=10, el=0)
>>> await tcs.offset_azel(az=0, el=10)

Results in only 10 arcsec offset in elevation, e.g., is equivalent to just doing the second command;

>>> await tcs.offset_azel(az=0, el=10, relative=True)

This is because the non-relative offset requested by the second command will reset the offset done on the previous command.

It is important to keep in mind that these offsets can also be combined with one another. For instance, if you do;

>>> await tcs.offset_azel(az=10, el=0)
>>> await tcs.offset_azel(az=0, el=10)
>>> await tcs.offset_azel(az=0, el=10, relative=False)

You will get 10 arcsec offset in azimuth and 20 arcsec in elevation.

Nevertheless, if after doing the above you do;

>>> await tcs.offset_azel(az=0, el=0, relative=False)

It will result in a 10 arcsec offset in both azimuth and elevation, from the relative offsets done previously.

In all cases above, the offset will be overwritten if a new target is sent, e.g.;

>>> await tcs.offset_azel(az=10, el=0, relative=True)
>>> await tcs.offset_azel(az=0, el=10, relative=True)
>>> await tcs.offset_azel(az=0, el=10)
>>> await tcs.slew_object("HD 164461")  # reset all offsets above

Will result in a slew with no offsets.

If you want offsets to persist between slews use absorb=True.

The relative flag applies the same way to absored offsets.

The following sequence of commands;

>>> await tcs.offset_azel(az=10, el=0, relative=True, absorb=True)
>>> await tcs.offset_azel(az=0, el=10, relative=True, absorb=True)
>>> await tcs.offset_azel(az=0, el=10, relative=False, absorb=True)
>>> await tcs.slew_object("HD 164461")

Will result in a slew offset by 10 arcsec in azimuth and 20 arcsec in elevation.

async offset_camera_hexapod(x: float, y: float, z: float, u: float, v: float, w: float = 0.0, sync: bool = True) None

Offset camera hexapod.

Offsets are always relative to the current hexapod position, regardless of the compensation mode being on or off.

Parameters:
xfloat

Hexapod-x position (microns).

yfloat

Hexapod-y position (microns).

zfloat

Hexapod-z position (microns).

ufloat

Hexapod-u angle (degrees).

vfloat

Hexapod-v angle (degrees).

wfloat, optional

Hexapod-w angle (degrees). Default 0.

syncbool, optional

Should the hexapod movement be synchronized? Default True.

async offset_done() None

Wait for offset events.

async offset_m2_hexapod(x: float, y: float, z: float, u: float, v: float, w: float = 0.0, sync: bool = True) None

Offset M2 hexapod.

Offsets are always relative to the current hexapod position, regardless of the compensation mode being on or off.

Parameters:
xfloat

Hexapod-x position (microns).

yfloat

Hexapod-y position (microns).

zfloat

Hexapod-z position (microns).

ufloat

Hexapod-u angle (degrees).

vfloat

Hexapod-v angle (degrees).

wfloat, optional

Hexapod-w angle (degrees). Default 0.

syncbool, optional

Should the hexapod movement be synchronized? Default True.

async offset_pa(angle: float, radius: float) None

Offset the telescope based on a position angle and radius.

Parameters:
anglefloat

Offset position angle, clockwise from North (degrees).

radiusfloat

Radial offset relative to target position (arcsec).

async offset_radec(ra: float, dec: float) None

Offset telescope in RA and Dec.

Perform arc-length offset in sky coordinates. The magnitude of the offset is sqrt(ra^2 + dec^2) and the angle is the usual atan2(dec, ra).

Parameters:
rafloat

Offset in ra (arcsec).

decfloat or str

Offset in dec (arcsec).

See also

offset_azel

Offset in local AzEl coordinates.

offset_xy

Offsets in the detector X/Y plane.

async offset_rot(rot: float) None

Apply a rotation offset.

Parameters:
rotfloat

Rotator offset (deg).

async offset_xy(x: float, y: float, relative: bool = True, persistent: bool | None = None, absorb: bool = False) None

Offsets in the detector X/Y plane.

Offset the telescope field-of-view in the x and y direction.

Parameters:
xfloat

Offset in camera x-axis (arcsec).

yfloat

Offset in camera y-axis (arcsec).

relativebool, optional

If True (default) offset is applied relative to the current position, if False offset replaces any existing offsets.

persistentbool or None, optional (deprecated)

(Deprecated) Should the offset be absorbed and persisted between slews? Use of this parameter is deprecated. Use absorb instead.

absorbbool, optional

Should the offset be absorbed and persisted between slews? (default: False)

See also

offset_azel

Offset in local AzEl coordinates.

offset_radec

Offset in sky coordinates.

reset_offsets

Reset offsets.

Notes

The persistent flag is deprecated. Use absorb instead.

If the image is displayed with the x-axis in horizontal position, increasing from left to right, a positive x-offset will result in the field-of-view moving to the right, and therefore, the stellar positions will move to the left.

If the image is displayed with y-axis in vertical position, increasing from bottom to top, a positive y-offset will result in field-of-view moving up, and therefore, the stellar positions will move down.

See the Notes section in offset_azel help page for more information about the relative and persistent flags.

async open_dome_shutter() None

Task to open dome shutter and return when it is done.

async open_m1_cover() None

Task to open m1 cover.

async open_m1m3_booster_valve() None

Open M1M3 booster valves.

parallactic_angle(ra: Union[float, str, Angle], dec: Union[float, str, Angle], time: Optional[Time] = None) Angle

Return parallactic angle for the given Ra/Dec coordinates.

Parameters:
rafloat, str or astropy.coordinates.Angle

Target RA, either as a float (hour), a sexagesimal string (HH:MM:SS.S or HH MM SS.S) coordinates or astropy.coordinates.Angle.

decfloat, str or astropy.coordinates.Angle

Target Dec, either as a float (deg), a sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle.

timeastropy.time.core.Time or None, optional

The time which the coordinate trasformation is intended for. If None (default) use current time.

Returns:
pa_angleastropy.coordinates.Angle

Parallactic angle.

async point_azel(az: float, el: float, rot_tel: float = 0.0, target_name: str = 'azel_target', wait_dome: bool = False, slew_timeout: float = 1200.0) None

Slew the telescope to a fixed alt/az position.

Telescope will not track once it arrives in position.

Parameters:
azfloat, str or astropy.coordinates.Angle

Target Azimuth (degree). Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

elfloat or str

Target Elevation (degree). Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

rot_telfloat or str

Specify rotator angle in mount physical coordinates. Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

target_namestr

Name of the position.

wait_domebool

Wait for dome to be in sync with the telescope? If preparing to take a flat, for instance, the dome will never be in sync.

slew_timeoutfloat

Timeout for the slew command (second).

async prepare_for_flatfield(check: Any = None) None

A high level method to position the telescope and dome for flat field operations.

Parameters:
checktypes.SimpleNamespace or None

Override self.check for defining which resources are used.

async prepare_for_onsky(overrides: Optional[Dict[str, str]] = None) None

Prepare telescope for on-sky operations.

Parameters:
overrides: `dict`

Dictionary with overrides to apply. If None use the recommended overrides.

async process_as_completed(tasks: List[Task]) Any

Process tasks are they complete.

If the first task that finishes completes successfully, it will cancel all other tasks in the list, empty the input list and return the value of the task. If the task results in an exception, it will cancel all other tasks, empty the list and raise the exception.

Parameters:
taskslist`[`asyncio.Tasks]

List of asyncio tasks to process.

Returns:
ret_valobject

Return value from the first completed task.

radec_from_azel(az: Union[float, str, Angle], el: Union[float, str, Angle], time: Optional[Time] = None) ICRS

Calculate Ra/Dec in ICRS coordinates from Az/El.

Parameters:
azfloat, str or astropy.coordinates.Angle

Target Azimuth (degree). Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

elfloat or str

Target Elevation (degree). Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

timeastropy.time.core.Time or None, optional

The time which the coordinate trasformation is intended for. If None (default) use current time.

Returns:
radec_icrsastropy.coordinates.ICRS

Astropy coordinates with azimuth and elevation.

async raise_m1m3() None

Raise M1M3.

async ready_to_take_data() None

Wait for the telescope control system to be ready to take data.

async release_authorization() None

Release authorization to command all required components from the group.

async request_authorization() None

Request authorization to command all required components from the group.

async reset_camera_hexapod_position() None

Reset position of the camera hexapod.

reset_checks() None

Reset all checks, enabling check for all components.

async reset_m1m3_forces() None

Reset M1M3 forces.

async reset_m2_forces() None

Reset M2 forces.

async reset_m2_hexapod_position() None

Reset position of the M2 hexapod.

async reset_offsets(absorbed: bool = True, non_absorbed: bool = True) None

Reset pointing offsets.

By default reset all pointing offsets. User can specify if they want to reset only the absorbed and non-absorbed offsets as well.

Parameters:
absorbedbool

Reset absorbed offset? Default True.

non_absorbedbool

Reset non-absorbed offset? Default True.

Raises:
RuntimeError:

If both absorbed and non_absorbed are False.

static rotation_matrix(angle: float) Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]

Rotation matrix.

async run_m1m3_actuator_bump_test(actuator_id: int, primary: bool = True, secondary: bool = False) None

M1M3 actuator bump test.

Parameters:
actuator_idint

Id of the actuator.

primarybool, optional

Test primary (z) actuator (default=True)?

secondarybool, optional

Test secondary (x/y) actuators (default=False)?

async run_m1m3_hard_point_test(hp: int) None

Test an M1M3 hard point.

Parameters:
hpint

Id of the hard point to test (start at 1).

async run_m2_actuator_bump_test(actuator: int, force: float, period: float = 60) None

M2 actuator bump test.

Parameters:
actuatorint

Id of the actuator.

forcefloat

the +/- push/pull foce to be applied in N

periodfloat, optional

There will be two bumps and each bump will wait for (2 * period) seconds. Default time is 60 seconds.

set_azel_slew_checks(wait_dome: bool) Any

Handle azEl slew to wait or not for the dome.

Parameters:
wait_domebool

Should the slew wait for the dome?

Returns:
checktypes.SimpleNamespace

Reformated check namespace.

async set_m1m3_slew_controller_settings(slew_setting: IntEnum, enable_slew_management: bool) None

Set a specific M1M3 slew controller setting based on the provided enumeration.

Parameters:
slew_settingenum.IntEnum

The specific force component setting to be changed.

enable_slew_managementbool

True to enable, False to disable the specified force component controlled by the slew controller.

set_rem_loglevel(level: int) None

Set remotes log level.

Useful to prevent the internal salobj warnings when read queues are filling up.

Parameters:
levelint

Log level.

set_rot_angle_alternatives(rot_angle_alternatives: List[float]) None

Set the rotator angle alternatives.

It is not necessary to pass the 0. alternative, as it is added by default.

Duplicated entries are also removed.

Parameters:
rot_angle_alternativestyping.List[float]

List of rotator angle alternatives (in deg).

async set_state(state: State, overrides: Optional[Dict[str, str]] = None, components: Optional[List[str]] = None) None

Set summary state for all components.

Parameters:
statesalobj.State

Desired state.

overridesdict or None

Settings to apply for each component.

componentslist[`str]`

List of components to set state, as they appear in self.components_attr.

Raises:
RuntimeError
  • If a component in components is not part of the group.

  • If it fails to transition one or more components.

async shutdown() None

Shutdown components.

async slew(ra: float, dec: float, rotPA: float = 0.0, target_name: str = 'slew_icrs', frame: Optional[IntEnum] = None, epoch: float = 2000.0, equinox: float = 2000.0, parallax: float = 0.0, pmRA: float = 0.0, pmDec: float = 0.0, rv: float = 0.0, dRA: float = 0.0, dDec: float = 0.0, rot_frame: Optional[IntEnum] = None, rot_track_frame: Optional[IntEnum] = None, rot_mode: Optional[IntEnum] = None, az_wrap_strategy: Optional[IntEnum] = None, time_on_target: float = 0.0, slew_timeout: float = 1200.0, stop_before_slew: bool = False, wait_settle: bool = True, offset_x: float = 0.0, offset_y: float = 0.0) None

Slew the telescope and start tracking an Ra/Dec target.

Parameters:
rafloat

Target Right Ascension (hour)

decfloat

Target Declination (degree)

rotPAfloat

Desired rotator position angle for slew (degree).

target_namestr

Name of the target

frameint

Target co-ordinate reference frame.

epochfloat

Target epoch in years e.g. 2000.0. Julian (J) epoch is assumed.

equinoxfloat

Target equinox in years e.g. 2000.0

parallaxfloat

Parallax (arcseconds).

pmRAfloat

Proper Motion (RA) in RA Seconds/year.

pmDecfloat

Proper motion (Dec) in Arcseconds/year.

rvfloat

Radial velocity (km/sec).

dRAfloat

Differential Track Rate in RA.

rot_frameenum

Rotator coordinate frame (self.RotFrame). Specify how to select the position of the rotator. If self.RotFrame.TARGET uses sky position angle. If self.RotFrame.FIXED uses rotator physical position.

rot_track_frameenum

Rotator track frame (self.RotFrame). Specify the rotator tracking mode. If self.RotFrame.TARGET, follow sky. If self.RotFrame.FIXED keep rotator at fixed position.

rot_modeenum

Rotator position mode (self.RotMode). If self.RotMode.FIELD optimize for sky tracking, if self.RotMode.SLIT optimize for slit spectroscopy.

slew_timeoutfloat

Timeout for the slew command (second).

stop_before_slewbool

Stop tracking before starting the slew? This option is a workaround to some issues with the mount components not sending events reliably.

wait_settlebool

Wait telescope to settle before returning?

async slew_dome_to(az: float, check: Any = None) None

Utility method to slew dome to a specified position.

Parameters:
azfloat or str

Azimuth angle for the dome (in deg).

checktypes.SimpleNamespace or None

Override self.check for defining which resources are used.

async slew_ephem_target(ephem_file: str, target_name: str, rot_sky: float = 0.0, validate_only: bool = False, slew_timeout: float = 240.0) None

Slew the telescope to a target defined by ephemeris data defined in a file.

Parameters:
ephem_filestr

Name of the file containing ephemeris data.

target_namestr

Target name.

rot_skyfloat

Desired instrument position angle (degree), Eastwards from North. Default is 0.0.

validate_onlybool, optional

If True, validate the target without changing the current demand. Default is False.

slew_timeoutfloat, optional

Timeout for the slew command in seconds, default is 1200 seconds (20 minutes).

async slew_icrs(ra: float, dec: float, rot: float = 0.0, rot_type: RotType = RotType.SkyAuto, target_name: str = 'slew_icrs', dra: float = 0.0, ddec: float = 0.0, offset_x: float = 0.0, offset_y: float = 0.0, az_wrap_strategy: enum.IntEnum | None = None, time_on_target: float = 0.0, slew_timeout: float = 240.0, stop_before_slew: bool = False, wait_settle: bool = True) Tuple[ICRS, Angle]

Slew the telescope and start tracking an Ra/Dec target in ICRS coordinate frame.

Parameters:
rafloat, str or astropy.coordinates.Angle

Target RA, either as a float (hour), a sexagesimal string (HH:MM:SS.S or HH MM SS.S) coordinates or astropy.coordinates.Angle.

decfloat, str or astropy.coordinates.Angle

Target Dec, either as a float (deg), a sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle.

rotfloat, str or astropy.coordinates.Angle

Specify desired rotation angle. The value will have different meaning depending on the choince of rot_type parameter. Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

rot_typelsst.ts.observatory.control.utils.RotType

Rotation type. This parameter defines how rot_value is threated. Default is SkyAuto, the rotator is positioned with respect to the North axis and is automatically wrapped if outside the limit. See RotType for more options.

target_namestr

Target name.

slew_timeoutfloat

Timeout for the slew command (second). Default is 240s.

Returns:
radec_icrsastropy.coordinates.ICRS

Coordinates used in slew command.

rot_angleastropy.coordinates.Angle

Angle used in command for rotator.

Other Parameters:
drafloat, optional

Differential Track Rate in RA (second/second). Default is 0.

ddecfloat, optional

Differential Track Rate in Dec (arcsec/second). Default is 0.

offset_xfloat, optional

Apply offset to original slew position (in arcsec).

offset_yfloat, optional

Apply offset to original slew position (in arcsec).

az_wrap_strategyazWrapStrategy or None, optional

Azimuth wrap strategy. By default use maxTimeOnTarget=3, which attempts to maximize the time on target. Other options are; 1-noUnWrap, 2-optimize.

time_on_targetfloat, optional

Estimated time on target, in seconds. This is used by the optimize azimuth wrap algorithm to determine whether it needs to unwrap or not.

stop_before_slewbool

Stop tracking before starting the slew? This option is a workaround to some issues with the ATMCS not sending events reliably.

wait_settlebool

Wait telescope to settle before returning? It True add an additional sleep of self.tel_settle_time to the telescope positioning algorithm. Otherwise the algorithm will return as soon as it receives allAxesInPosition event from the ATMCS.

See also

slew_object

Slew to an object name.

async slew_object(name: str, rot: float = 0.0, rot_type: RotType = RotType.SkyAuto, dra: float = 0.0, ddec: float = 0.0, offset_x: float = 0.0, offset_y: float = 0.0, az_wrap_strategy: Optional[IntEnum] = None, time_on_target: float = 0.0, slew_timeout: float = 240.0) Tuple[ICRS, Angle]

Slew to an object name.

Use simbad to resolve the name and get coordinates.

Parameters:
namestr

Target name.

rotfloat, str or astropy.coordinates.Angle, optional

Specify desired rotation angle. Strategy depends on rot_type parameter. Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or astropy.coordinates.Angle

rot_typelsst.ts.observatory.control.utils.RotType, optional

Rotation type. This parameter defines how rot_value is threated. Default is SkyAuto, the rotator is positioned with respect to the North axis and is automacally wrapped if outside the limit. See RotType for more options.

slew_timeoutfloat, optional

Timeout for the slew command (second). Default is 240 seconds.

Other Parameters:
drafloat, optional

Differential Track Rate in RA (second/second). Default is 0.

ddecfloat, optional

Differential Track Rate in Dec (arcsec/second). Default is 0.

offset_xfloat, optional

Apply offset to original slew position (in arcsec).

offset_yfloat, optional

Apply offset to original slew position (in arcsec).

az_wrap_strategyazWrapStrategy or None, optional

Azimuth wrap strategy. By default use maxTimeOnTarget=3, which attempts to maximize the time on target. Other options are; 1-noUnWrap, 2-optimize.

time_on_targetfloat, optional

Estimated time on target, in seconds. This is used by the optimize azimuth wrap algorithm to determine whether it needs to unwrap or not.

See also

slew_icrs

Slew to an ICRS coordinates.

async slew_to_planet(planet: IntEnum, rot_sky: float = 0.0, slew_timeout: float = 1200.0) None

Slew and track a solar system body.

Parameters:
planetenum.IntEnum

Enumeration with planet name.

rot_skyfloat

Desired instrument position angle (degree), Eastwards from North.

slew_timeoutfloat, optional

Timeout for the slew command (second).

async standby() None

Put all CSCs in standby.

async start_tracking() None

Start tracking the current position of the telescope.

Method returns once telescope and dome are in sync.

async stop_all() None

Stop telescope and dome.

async stop_m1m3_bump_test() None

Stop bump test.

async stop_m1m3_hard_point_test(hp: int) None

Interrupt hard point test.

Parameters:
hpint

Id of the hard point for which the test is to be interrupted (start at 1).

async stop_m2_bump_test() None

Stop the M2 actuator bump test.

Raises:
NotImplementedError

This method is not currently implemented.

async stop_rotator() None

Stop rotator movement and wait for controller to publish Stationary substate event.

async stop_tracking() None

Task to stop telescope tracking.

async wait_for_dome_inposition(timeout: float, wait_settle: bool = True) str

Wait for the Dome to be in position.

Parameters:
timeout: `float`

How to to wait for mount to be in position (in seconds).

wait_settle: `bool`

After receiving the in position command add an addional settle wait? (default: True)

Returns:
ret_valstr

String indicating that dome is in position.

async wait_for_inposition(timeout: float, wait_settle: bool = True, check: Optional[Any] = None) List[str]

Wait for Mount, Dome and Rotator to be in position.

Parameters:
timeoutfloat

How long should it wait before timing out.

wait_settlebool

After slew complets, add an addional settle wait before returning.

checktypes.SimpleNamespace or None

Override self.check for defining which resources are used.

Returns:
statuslist of str

String with final status.

async wait_for_mtmount_inposition(timeout: float, wait_settle: bool = True) None

Wait for the MTMount inPosition event.

Parameters:
timeout: `float`

How to to wait for mount to be in position (in seconds).

wait_settle: `bool`

After receiving the in position command add an addional settle wait? (default: True)

async wait_for_rotator_inposition(timeout: float, wait_settle: bool = True) str

Wait for the Rotator inPosition event.

Parameters:
timeout: `float`

How to to wait for mount to be in position (in seconds).

wait_settle: `bool`

After receiving the in position command add an addional settle wait? (default: True)

Returns:
str

Message indicating the component is in position.

async wait_m1m3_force_balance_system(timeout: float) None

Wait for m1m3 force balance system to stabilize.

Parameters:
timeoutfloat

How long to wait before timing out (in seconds).

async wait_m1m3_settle() None

Wait until m1m3 has settle.