MTCS¶
- class lsst.ts.observatory.control.maintel.MTCS(domain: Domain | None = None, log: Logger | None = None, intended_usage: int | None = None)¶
Bases:
BaseTCSHigh 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
Return CoordFrame enumeration.
Return RotFrame enumeration.
Return RotMode enumeration.
Return WrapStrategy enumeration
Set with the name of the components that support compensation mode.
List of components names.
List of remotes names.
Return name of the DomeTrajectory component.
M1M3 engineering states.
Plate scale in mm/arcsec.
Return name of the pointing component.
Define class usages.
Returns valid usages.
Methods Summary
Abort a raise m1m3 operation.
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 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 if dome following is enabled.
check_tracking([track_duration])Check tracking state.
Clear internal catalog.
close()close_dome([force])Method to close dome shutter.
Method to close mirror covers.
Close M1M3 booster valves.
Return components for which check is enabled.
Disable camera cable wrap following the rotator.
disable_checks_for_components(components)Disables checks for a list of components.
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 m2 balance system.
Wait for
_dome_az_in_positionevent to be set and return a string indicating the dome azimuth is in position.Wait for
_dome_el_in_positionevent to be set and return a string indicating the dome elevation is in position.enable([overrides])Enable all components.
enable_aos_closed_loop(config)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 m2 balance system.
Enter 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.
Abstract method to flush events before and offset is performed.
Get the instrument bore sight angle with respect to the telescope axis.
Return the last sample of
compensationModeevent from camera hexapod.Return the last sample of
compensationModeevent from m2 hexapod.get_heartbeat(component)Get last heartbeat for component.
Get user identity.
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 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_actuator_to_test(actuators_to_test)Given a list of m1m3 actuator to test, generate a list of actuator that can be tested concurrently.
Returns the last sample of
appliedBalanceForcesdata from m1m3.get_m1m3_bump_test_status(actuator_id)Get latest m1m3 bump test status.
Retrieve the current M1M3 slew controller settings.
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 the telescope and dome vent azimuth.
get_work_components([components])Parse input into a list of valid components from the group.
home_dome([physical_az])Utility method to home dome.
Check if MTMount is in safe range for mirror covers operation.
is_actuator_in_testing_state(actuator_data, ...)Check if catalog is loaded.
Check if M1M3 is in engineering mode.
List of available catalogs to load.
load_catalog(catalog_name)Load a catalog from the available set.
Lower M1M3.
Context manager to handle opening/closing M1M3 booster valves.
Context manager to ensure m1m3 enters and exists engineering mode before/after an operation.
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.
Returns the next sample of
appliedBalanceForcesdata from m1m3.next_state(component)Get summary state for component.
object_list_add(name, radec)Add object to object list.
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.
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.
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([force])Method to open dome shutter.
Method to open mirror covers.
Open M1M3 booster valves.
parallactic_angle(ra, dec[, time])Return parallactic angle for the given Ra/Dec coordinates.
Park the dome by moving it to the park azimuth.
park_mount(position)Park the TMA in the selected position.
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.
Make sure telescope is ready to perform an offset.
Wait for the telescope control system to be ready to take data.
Reset position of the camera hexapod.
Reset all checks, enabling check for all components.
Reset M1M3 forces.
Reset M2 forces.
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.
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 a specific M1M3 slew controller setting based on the provided enumeration.
set_rem_loglevel(level)Set remotes log level.
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 the telescope to safe range for mirror covers operation.
slew_to_planet(planet[, rot_sky, slew_timeout])Slew and track a solar system body.
standby()Put all CSCs in standby.
start_tracking([slew_timeout])Start tracking the current position of the telescope.
stop_all()Stop telescope and dome.
Stop bump test.
Interrupt hard point test.
Stop the M2 actuator bump test.
Stop rotator movement and wait for controller to publish Stationary substate event.
Task to stop telescope tracking.
Un-Park the dome by moving it a small delta amount.
Un-park the TMA.
wait_for_dome_inposition(timeout[, wait_settle])Wait for the Dome to be in position.
wait_for_dome_state(expected_states, ...[, ...])Wait for a specific dome state.
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
inPositionevent.wait_for_rotator_inposition(timeout[, ...])Wait for the Rotator
inPositionevent.wait_m1m3_actuator_in_testing_state(actuator)Wait until the specified actuator enters testing state.
wait_m1m3_force_balance_system(timeout)Wait for m1m3 force balance system to stabilize.
Wait until m1m3 has settle.
Wait until the mount and rotator reports that they have stopped tracking.
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”.
- 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”.
- dome_trajectory_name¶
Return name of the DomeTrajectory component.
- instrument_focus¶
- m1m3_engineering_states¶
M1M3 engineering states.
- Returns:
set`[ `MTM1M3.DetailedStates]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 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:
- component
str Name of the component
- component
- Raises:
- AssertionError
If
componentdoes 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
checkfeature will apply to the assertion so components marked withcheck=Falsewill 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: float | str | Angle, dec: float | str | Angle, time: Time | None = None) AltAz¶
Calculate Az/El coordinates from RA/Dec in ICRS.
- Parameters:
- ra
float,strorastropy.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.- dec
float,strorastropy.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.- time
astropy.time.core.TimeorNone, optional The time which the coordinate trasformation is intended for. If
None(default) use current time.
- ra
- Returns:
- azel
astropy.coordinates.AltAz Astropy coordinates with azimuth and elevation.
- azel
- 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:
- tasks
list[futures] A list of coroutines to cancel.
- tasks
- 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:
- component
str 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”.
- component
- Raises:
- RuntimeError
If the component does not send heartbeats in
self.fast_timeoutseconds.
- 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:
- component
str Name of the component to follow. Must be one of: atmcs, atptg, ataos, atpneumatics, athexapod, atdome, atdometrajectory
- desired_state
salobj.State Desired state of the CSC.
- component
- Raises:
- RuntimeError
If state is not
desired_state.- KeyError
If component is not found.
- async check_tracking(track_duration: float | None = 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_durationis specified, the method will return after the time has passed. Otherwise it will just check forever.
- async close_dome(force: bool = False) None¶
Method to close dome shutter.
- Raises:
- RuntimeError
If shutter motion state is neither OPEN nor CLOSED. If mirror covers are RETRACTED and telescope elevation is not in safe range unless force=True.
Warning
The dome shutter should not be closed when the mirror covers are retracted. This method will check if the covers are deployed or if the telescope is in a safe elevation to continue.
- async close_m1_cover() None¶
Method to close mirror covers.
- Raises:
- RuntimeError
If mirror covers state is neither DEPLOYED nor RETRACTED. If mirror system state is FAULT.
Warning
The mirror covers should be closed when the telescope is pointing to the zenith. 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.
- disable_checks_for_components(components: List[str]) None¶
Disables checks for a list of components.
The elements of
componentsthat are not part of the CSC group will be ignored.- Parameters:
- components: `list` of `str`
A list of strings that indentifies the components to disable the check. The names can be eather in attribute format (e.g. “mtmount” or “hexapod_1”) or in salobj remote name format (e.g. “MTMount” or “Hexapod:1”).
- async disable_compensation_mode(component: str) None¶
Disable compensation mode for one of the hexapods.
- Parameters:
- component
str Name of the component
- component
See also
enable_compensation_modeEnable compensation mode.
compensation_mode_componentsSet of components with compensation mode.
- async dome_az_in_position() str¶
Wait for
_dome_az_in_positionevent 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_positionevent to be set and return a string indicating the dome elevation is in position.
- async enable(overrides: Dict[str, str] | None = 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
Noneuse recommended overrides.
- async enable_compensation_mode(component: str) None¶
Enable compensation mode for one of the hexapods.
- Parameters:
- component
str Name of the component. Must be in
compensation_mode_components.
- component
See also
disable_compensation_modeDisable compensation mode.
compensation_mode_componentsSet of components with compensation mode.
- async expand_overrides(overrides: Dict[str, str] | None = None) Dict[str, str]¶
Expand an overrides dict with entries for every component.
Any components that have no specified override are set to “”.
- Parameters:
- overrides
dictorNone A dictionary with (component name, overrides) pair or
None. The component name is as it appears in thecomponents_attrattribute, which is the name of the CSC in lowercase, replacing “:” by “_” for indexed components, e.g. “Hexapod:1” -> “hexapod_1” or “ATHexapod” -> “athexapod”.
- overrides
- Returns:
- complete_overrides
dict Dictionary with overrides for every component in the group. Unspecifies components have override “”.
- complete_overrides
- Raises:
- RuntimeError
If an item in the parameter
overridesdictionary 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:
- target
astropy.Table Target information.
- target
- 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:
strName 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:
strName 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:
strName of the target.
- Raises:
- RuntimeError:
If no object is found.
- 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
compensationModeevent from camera hexapod.- Returns:
MTHexapod_logevent_compensationMode
- async get_compensation_mode_m2_hexapod() BaseMsgType¶
Return the last sample of
compensationModeevent from m2 hexapod.- Returns:
MTHexapod_logevent_compensationMode
- async get_heartbeat(component: str) BaseMsgType¶
Get last heartbeat for component.
- Parameters:
- component
str Name of the component.
- component
- Returns:
- heartbeat
Last component heartbeat.
- 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_id
int Actuator id.
- actuator_id
- Returns:
- actuator_index
int Array index of actuator.
- actuator_index
- Raises:
- RuntimeError
If
actuator_idis not valid.
See also
get_m1m3_actuator_secondary_indexGet 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_id
int Actuator id.
- actuator_id
- Returns:
- actuator_index
int Secondary array index of actuator.
- actuator_index
- Raises:
- RuntimeError
If
actuator_idis not valid.
See also
get_m1m3_actuator_indexGet m1m3 actuator index from actuator id.
- async get_m1m3_actuator_to_test(actuators_to_test: list[int]) AsyncGenerator[ForceActuatorData, None]¶
Given a list of m1m3 actuator to test, generate a list of actuator that can be tested concurrently.
- Yields:
intId of the next suitable M1M3 actuator to test.
- async get_m1m3_applied_balance_forces() BaseMsgType¶
Returns the last sample of
appliedBalanceForcesdata from m1m3.- Returns:
MTM1M3_logevent_appliedBalanceForcesorMTM1M3_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_id
int Id of the actuator.
- actuator_id
- Returns:
- primary_status
MTM1M3.BumpTest Status of the primary (z-axis) test.
- secondary_status
MTM1M3.BumpTest| None Status of the secondary (xy-axis) test.
- primary_status
- 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.
- get_required_resources(component: str, intended_usage: 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_attrattribute (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:
- 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.
- async get_simulation_mode(components: List[str] | None = None) Dict[str, BaseMsgType]¶
Return a list with the simulation mode for components in the group.
- async get_software_versions(components: List[str] | None = None) Dict[str, BaseMsgType]¶
Return a list with the software versions for components in the group.
- async get_state(component: str, ignore_timeout: bool = False) State¶
Get summary state for component.
- Parameters:
- component
str Name of the component.
- ignore_timeout
bool If
Truewill return None in case it times out getting the state. Default isFalse, which means raiseTimeoutError.
- component
- Returns:
- state
salobj.StateorNone Current state of component.
- state
- Raises:
asyncio.TimeoutErrorIf can not get state in
self.fast_timeoutseconds.
- get_work_components(components: List[str] | None = None) List[str]¶
Parse input into a list of valid components from the group.
- async home_dome(physical_az: float = 0.0) None¶
Utility method to home dome.
- Parameters:
- physical_az
float Azimuth angle of the dome as read by markings (in deg).
- physical_az
- async in_m1_cover_operational_range() bool¶
Check if MTMount is in safe range for mirror covers operation.
- list_available_catalogs() Set[str]¶
List of available catalogs to load.
- Returns:
- catalog_names
set Set with the names of the available catalogs.
- catalog_names
See also
load_catalogLoad a catalog from the available set.
- load_catalog(catalog_name: str) None¶
Load a catalog from the available set.
- Parameters:
- catalog_name
str Name of the catalog to load. Must be a valid entry in the list of available catalogs.
- catalog_name
- Raises:
- RuntimeError
If input
catalog_nameis 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_catalogsList available catalogs to load.
- m1m3_booster_valve() AsyncIterator[None]¶
Context manager to handle opening/closing M1M3 booster valves.
- m1m3_in_engineering_mode() AsyncIterator[None]¶
Context manager to ensure m1m3 enters and exists engineering mode before/after an operation.
If M1M3 is in engineering mode before, this context manager is a nop, e.g. it will leave M1M3 in engineering mode afterwards.
- 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: Any | None = 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:
- check
types.SimpleNamespaceorNone Override
self.checkfor defining which resources are used.
- check
- 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:
- x
float Hexapod-x position (microns).
- y
float Hexapod-y position (microns).
- z
float Hexapod-z position (microns).
- u
float Hexapod-u angle (degrees).
- v
float Hexapod-v angle (degrees).
- w
float, optional Hexapod-w angle (degrees). Default 0.
- sync
bool, optional Should the hexapod movement be synchronized? Default True.
- x
- 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:
- x
float Hexapod-x position (microns).
- y
float Hexapod-y position (microns).
- z
float Hexapod-z position (microns).
- u
float Hexapod-u angle (degrees).
- v
float Hexapod-v angle (degrees).
- w
float, optional Hexapod-w angle (degrees). Default 0.
- sync
bool, optional Should the hexapod movement be synchronized? Default True.
- x
- async move_p2p_azel(az: float, el: float, timeout: float = 120.0) None¶
Move telescope using point to point mode.
- 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.
- async move_rotator(position: float, wait_for_in_position: bool = True) None¶
Move rotator to specified position and wait for movement to complete.
- async next_heartbeat(component: str) BaseMsgType¶
Get next heartbeat for component.
- Parameters:
- component
str Name of the component.
- component
- Returns:
- heartbeat
Last component heartbeat.
- async next_m1m3_applied_balance_forces(flush: bool) BaseMsgType¶
Returns the next sample of
appliedBalanceForcesdata from m1m3.- Parameters:
- flush
bool Flush the topic queue before getting the next sample?
- flush
- Returns:
MTM1M3_logevent_appliedBalanceForcesorMTM1M3_appliedBalanceForces
- async next_state(component: str) State¶
Get summary state for component.
- Parameters:
- component
str Name of the component.
- component
- Returns:
- state
salobj.State Current state of component.
- state
- 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_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.
- radec:
- object_list_get_all() Set[str]¶
Return list of objects in the object list.
- Returns:
- object_list_names
set Set with the names of all targets in the object list.
- object_list_names
- 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 offset_azel(az: float, el: float, relative: bool = True, persistent: bool | None = 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:
- az
float Offset in azimuth (arcsec).
- el
float Offset in elevation (arcsec).
- relative
bool, optional If
True(default) offset is applied relative to the current position, ifFalseoffset replaces any existing offsets.- persistent
boolorNone, optional (deprecated) (Deprecated) Should the offset be absorbed and persisted between slews? Use of this parameter is deprecated. Use
absorbinstead.- absorb
bool, optional Should the offset be absorbed and persisted between slews? (default:
False)
- az
See also
offset_xyOffsets in the detector X/Y plane.
offset_radecOffset in sky coordinates.
reset_offsetsReset offsets.
Notes
The
persistentflag is deprecated. Useabsorbinstead.There are a couple different ways users can modify how offsets are treated via the input flags
relativeandabsorb.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=Trueandabsorb=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
relativeflag 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:
- x
float Hexapod-x position (microns).
- y
float Hexapod-y position (microns).
- z
float Hexapod-z position (microns).
- u
float Hexapod-u angle (degrees).
- v
float Hexapod-v angle (degrees).
- w
float, optional Hexapod-w angle (degrees). Default 0.
- sync
bool, optional Should the hexapod movement be synchronized? Default True.
- x
- 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:
- x
float Hexapod-x position (microns).
- y
float Hexapod-y position (microns).
- z
float Hexapod-z position (microns).
- u
float Hexapod-u angle (degrees).
- v
float Hexapod-v angle (degrees).
- w
float, optional Hexapod-w angle (degrees). Default 0.
- sync
bool, optional Should the hexapod movement be synchronized? Default True.
- x
- async offset_pa(angle: float, radius: float) None¶
Offset the telescope based on a position angle and radius.
- 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).
See also
offset_azelOffset in local AzEl coordinates.
offset_xyOffsets in the detector X/Y plane.
- async offset_rot(rot: float) None¶
Apply a rotation offset.
- Parameters:
- rot
float Rotator offset (deg).
- rot
- 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:
- x
float Offset in camera x-axis (arcsec).
- y
float Offset in camera y-axis (arcsec).
- relative
bool, optional If
True(default) offset is applied relative to the current position, ifFalseoffset replaces any existing offsets.- persistent
boolorNone, optional (deprecated) (Deprecated) Should the offset be absorbed and persisted between slews? Use of this parameter is deprecated. Use
absorbinstead.- absorb
bool, optional Should the offset be absorbed and persisted between slews? (default:
False)
- x
See also
offset_azelOffset in local AzEl coordinates.
offset_radecOffset in sky coordinates.
reset_offsetsReset offsets.
Notes
The
persistentflag is deprecated. Useabsorbinstead.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_azelhelp page for more information about therelativeandpersistentflags.
- async open_dome_shutter(force: bool = False) None¶
Method to open dome shutter.
- Raises:
- RuntimeError
If shutter motion state is neither OPEN nor CLOSED. If mirror covers are RETRACTED and telescope elevation is not in safe range unless force=True.
Warning
The dome shutter should not be opened when the mirror covers are retracted. This method will check if the covers are deployed or if the telescope is in a safe elevation to continue.
- async open_m1_cover() None¶
Method to open mirror covers.
- Raises:
- RuntimeError
If mirror covers state is neither DEPLOYED nor RETRACTED. If mirror system state is FAULT.
Warning
The mirror covers should be opened when the telescope is pointing to the zenith. 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.
- parallactic_angle(ra: float | str | Angle, dec: float | str | Angle, time: Time | None = None) Angle¶
Return parallactic angle for the given Ra/Dec coordinates.
- Parameters:
- ra
float,strorastropy.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.- dec
float,strorastropy.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.- time
astropy.time.core.TimeorNone, optional The time which the coordinate trasformation is intended for. If
None(default) use current time.
- ra
- Returns:
- pa_angle
astropy.coordinates.Angle Parallactic angle.
- pa_angle
- async park_mount(position: ParkPosition) None¶
Park the TMA in the selected position.
- Parameters:
- position
MTMount.ParkPosition The position to park the TMA.
- position
- 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:
- az
float,stror 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- el
floatorstr Target Elevation (degree). Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or
astropy.coordinates.Angle- rot_tel
floatorstr 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_name
str Name of the position.
- wait_dome
bool 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_timeout
float Timeout for the slew command (second).
- az
- async prepare_for_flatfield(check: Any = None) None¶
A high level method to position the telescope and dome for flat field operations.
- Parameters:
- check
types.SimpleNamespaceorNone Override
self.checkfor defining which resources are used.
- check
- async prepare_for_onsky(overrides: Dict[str, str] | None = None) None¶
Prepare telescope for on-sky operations.
- Parameters:
- overrides: `dict`
Dictionary with overrides to apply. If
Noneuse 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:
- tasks
list`[`asyncio.Tasks] List of asyncio tasks to process.
- tasks
- Returns:
- ret_val
object Return value from the first completed task.
- ret_val
- radec_from_azel(az: float | str | Angle, el: float | str | Angle, time: Time | None = None) ICRS¶
Calculate Ra/Dec in ICRS coordinates from Az/El.
- Parameters:
- az
float,stror 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- el
floatorstr Target Elevation (degree). Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates or
astropy.coordinates.Angle- time
astropy.time.core.TimeorNone, optional The time which the coordinate trasformation is intended for. If
None(default) use current time.
- az
- Returns:
- radec_icrs
astropy.coordinates.ICRS Astropy coordinates with azimuth and elevation.
- radec_icrs
- ready_to_offset() AsyncIterator[None]¶
Make sure telescope is ready to perform an offset.
Overrides the parent class to implement setting/unsetting the slew flag on m1m3.
- 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.
- static rotation_matrix(angle: float) Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[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.
- async run_m1m3_hard_point_test(hp: int) None¶
Test an M1M3 hard point.
- Parameters:
- hp
int Id of the hard point to test (start at 1).
- hp
- async run_m2_actuator_bump_test(actuator: int, force: float, period: float = 60) None¶
M2 actuator bump test.
- set_azel_slew_checks(wait_dome: bool) Any¶
Handle azEl slew to wait or not for the dome.
- Parameters:
- wait_dome
bool Should the slew wait for the dome?
- wait_dome
- Returns:
- check
types.SimpleNamespace Reformated check namespace.
- check
- 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:
- level
int Log level.
- 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: Dict[str, str] | None = None, components: List[str] | None = None) None¶
Set summary state for all components.
- Parameters:
- state
salobj.State Desired state.
- overrides
dictor None Settings to apply for each component.
- components
list[`str]` List of components to set state, as they appear in
self.components_attr.
- state
- Raises:
- RuntimeError
If a component in
componentsis not part of the group.If it fails to transition one or more components.
- async slew(ra: float, dec: float, rotPA: float = 0.0, target_name: str = 'slew_icrs', frame: IntEnum | None = 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: IntEnum | None = None, rot_track_frame: IntEnum | None = None, rot_mode: IntEnum | None = None, az_wrap_strategy: IntEnum | None = 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_name
str Name of the target
- frame
int Target co-ordinate reference frame.
- epoch
float Target epoch in years e.g. 2000.0. Julian (J) epoch is assumed.
- equinox
float Target equinox in years e.g. 2000.0
- parallax
float Parallax (arcseconds).
- pmRA
float Proper Motion (RA) in RA Seconds/year.
- pmDec
float Proper motion (Dec) in Arcseconds/year.
- rv
float Radial velocity (km/sec).
- dRA
float Differential Track Rate in RA.
- rot_frame
enum Rotator coordinate frame (
self.RotFrame). Specify how to select the position of the rotator. Ifself.RotFrame.TARGETuses sky position angle. Ifself.RotFrame.FIXEDuses rotator physical position.- rot_track_frame
enum Rotator track frame (
self.RotFrame). Specify the rotator tracking mode. Ifself.RotFrame.TARGET, follow sky. Ifself.RotFrame.FIXEDkeep rotator at fixed position.- rot_mode
enum Rotator position mode (
self.RotMode). Ifself.RotMode.FIELDoptimize for sky tracking, ifself.RotMode.SLIToptimize for slit spectroscopy.- slew_timeout
float Timeout for the slew command (second).
- stop_before_slew
bool Stop tracking before starting the slew? This option is a workaround to some issues with the mount components not sending events reliably.
- wait_settle
bool 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:
- az
floatorstr Azimuth angle for the dome (in deg).
- check
types.SimpleNamespaceorNone Override
self.checkfor defining which resources are used.
- az
- Raises:
- RuntimeError
If the
mtdometrajectoryis ignored while the dome following is enabled. This is to prevent conflicts between the dome trajectory and the dome following features, which could result in unexpected behavior while slewing the dome.
- 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: 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:
- ra
float,strorastropy.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.- dec
float,strorastropy.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.- rot
float,strorastropy.coordinates.Angle Specify desired rotation angle. The value will have different meaning depending on the choince of
rot_typeparameter. Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates orastropy.coordinates.Angle- rot_type
lsst.ts.observatory.control.utils.RotType Rotation type. This parameter defines how
rot_valueis threated. Default isSkyAuto, the rotator is positioned with respect to the North axis and is automatically wrapped if outside the limit. SeeRotTypefor more options.- target_name
str Target name.
- slew_timeout
float Timeout for the slew command (second). Default is 240s.
- ra
- Returns:
- radec_icrs
astropy.coordinates.ICRS Coordinates used in slew command.
- rot_angle
astropy.coordinates.Angle Angle used in command for rotator.
- radec_icrs
- Other Parameters:
- dra
float, optional Differential Track Rate in RA (second/second). Default is 0.
- ddec
float, optional Differential Track Rate in Dec (arcsec/second). Default is 0.
- offset_x
float, optional Apply offset to original slew position (in arcsec).
- offset_y
float, optional Apply offset to original slew position (in arcsec).
- az_wrap_strategy
azWrapStrategyorNone, 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_target
float, 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_slew
bool Stop tracking before starting the slew? This option is a workaround to some issues with the ATMCS not sending events reliably.
- wait_settle
bool Wait telescope to settle before returning? It
Trueadd an additional sleep ofself.tel_settle_timeto the telescope positioning algorithm. Otherwise the algorithm will return as soon as it receivesallAxesInPositionevent from the ATMCS.
- dra
See also
slew_objectSlew 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: IntEnum | None = 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:
- name
str Target name.
- rot
float,strorastropy.coordinates.Angle, optional Specify desired rotation angle. Strategy depends on
rot_typeparameter. Accepts float (deg), sexagesimal string (DD:MM:SS.S or DD MM SS.S) coordinates orastropy.coordinates.Angle- rot_type
lsst.ts.observatory.control.utils.RotType, optional Rotation type. This parameter defines how
rot_valueis threated. Default isSkyAuto, the rotator is positioned with respect to the North axis and is automacally wrapped if outside the limit. SeeRotTypefor more options.- slew_timeout
float, optional Timeout for the slew command (second). Default is 240 seconds.
- name
- Other Parameters:
- dra
float, optional Differential Track Rate in RA (second/second). Default is 0.
- ddec
float, optional Differential Track Rate in Dec (arcsec/second). Default is 0.
- offset_x
float, optional Apply offset to original slew position (in arcsec).
- offset_y
float, optional Apply offset to original slew position (in arcsec).
- az_wrap_strategy
azWrapStrategyorNone, 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_target
float, 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.
- dra
See also
slew_icrsSlew to an ICRS coordinates.
- async slew_to_m1_cover_operational_range() None¶
Slew the telescope to safe range for mirror covers operation.
This method will slew the telescope to a safe elevation to perform mirror covers operations. It should be used in combination with the in_m1_covers_operational_range method.
- 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:
- planet
enum.IntEnum Enumeration with planet name.
- rot_sky
float Desired instrument position angle (degree), Eastwards from North.
- slew_timeout
float, optional Timeout for the slew command (second).
- planet
- async start_tracking(slew_timeout: float = 1200.0) None¶
Start tracking the current position of the telescope.
Method returns once telescope and dome are in sync.
- async stop_m1m3_hard_point_test(hp: int) None¶
Interrupt hard point test.
- Parameters:
- hp
int Id of the hard point for which the test is to be interrupted (start at 1).
- hp
- 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 wait_for_dome_inposition(timeout: float, wait_settle: bool = True) str¶
Wait for the Dome to be in position.
- Parameters:
- timeout: `float`
How to wait for mount to be in position (in seconds).
- wait_settle: `bool`
After receiving the in position command, add an additional settle wait? (default: True)
- Returns:
- ret_val
str String indicating that dome is in position.
- ret_val
- async wait_for_dome_state(expected_states: set[lsst.ts.xml.enums.MTDome.MotionState], bad_states: set[lsst.ts.xml.enums.MTDome.MotionState], timeout: float, check_in_position: bool = False) None¶
Wait for a specific dome state.
- Parameters:
- expected_statesset[MTDome.MotionState]
Valid states to transition into while un-parking.
- bad_statesset[MTDome.MotionState]
States that are not allowed while un-parking and should raise an error.
- timeoutfloat
Maximum time to wait for the correct state.
- Raises:
- RuntimeError
- If a bad state is encountered or the expected state is not reached
in time.
- async wait_for_inposition(timeout: float, wait_settle: bool = True, check: Any | None = None) List[str]¶
Wait for Mount, Dome and Rotator to be in position.
- async wait_for_mtmount_inposition(timeout: float, wait_settle: bool = True) None¶
Wait for the MTMount
inPositionevent.- 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
inPositionevent.- 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:
strMessage indicating the component is in position.
- async wait_m1m3_actuator_in_testing_state(actuator: ForceActuatorData) None¶
Wait until the specified actuator enters testing state.
- Parameters:
- actuator
ForceActuatorData Metadata about the actuator to wait for.
- actuator