BaseTCS#

class lsst.ts.observatory.control.BaseTCS(components, domain=None, log=None, intended_usage=None, concurrent_operation=True)#

Bases: RemoteGroup

Base class for Telescope Control System.

Parameters:
  • components (list [str]) – A list of strings with the names of the SAL components that are part of the telescope control system group.

  • domain (lsst.ts.salobj.Domain) – Domain for remotes. If None create a domain.

  • log (logging.Logger) – Optional logging class to be used for logging operations. If None, creates a new logger.

  • intended_usage (int) – Optional integer that maps to a list of intended operations. This is used to limit the resources allocated by the class by gathering some knowledge about the usage intention. By default allocates all resources.

  • concurrent_operation (bool, optional) – If False, tasks like enable and other concurrent tasks will be done sequentially. Default=True.

Attributes Summary

CoordFrame

Return CoordFrame enumeration.

RotFrame

Return RotFrame enumeration.

RotMode

Return RotMode enumeration.

WrapStrategy

Return WrapStrategy enumeration

dome_trajectory_name

Return name of the DomeTrajectory component.

instrument_focus

plate_scale

Plate scale in mm/arcsec.

ptg_name

Return name of the pointing component.

Methods Summary

add_point_data()

Add current position to a point file.

azel_from_radec(ra, dec[, time])

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

check_dome_following()

Check if dome following is enabled.

check_tracking([track_duration])

Check tracking state.

clear_catalog()

Clear internal catalog.

close_dome()

Task to close dome.

close_m1_cover()

Task to close m1 cover.

disable_dome_following([check])

Disable dome following mode.

enable_dome_following([check])

Enabled dome following mode.

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_rot_angle_alternatives(rot_angle)

Generate rotator angle alternatives based on the input rotator angle.

get_sun_azel([time_tai])

Get the sun azimuth and elevation.

get_telescope_and_dome_vent_azimuth()

Get the telescope and dome vent azimuth.

home_dome()

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

is_catalog_loaded()

Check if catalog is loaded.

list_available_catalogs()

List of available catalogs to load.

load_catalog(catalog_name)

Load a catalog from the available set.

monitor_position([check])

Monitor and log the position of the telescope and the dome.

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.

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

Offset telescope in azimuth and elevation.

offset_done()

Wait for offset events.

offset_pa(angle, radius)

Offset the telescope based on a position angle and radius.

offset_radec(ra, dec[, absorb])

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.

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.

radec_from_azel(az, el[, time])

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

ready_to_offset()

A context manager to handle preparing the telescope for offset.

ready_to_take_data()

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

reset_offsets([absorbed, non_absorbed])

Reset pointing offsets.

rotation_matrix(angle)

Rotation matrix.

set_azel_slew_checks(wait_dome)

Abstract method to handle azEl slew to wait or not for the dome.

set_rot_angle_alternatives(...)

Set the rotator angle alternatives.

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, timeout])

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.

start_tracking([slew_timeout])

Start tracking the current position of the telescope.

stop_all()

Stop telescope and dome.

stop_tracking()

Task to stop telescope tracking.

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

Wait for both the ATMCS and ATDome to be in position.

wait_tracking_stopped()

Task to wait until tracking has stopped.

Attributes Documentation

CoordFrame#

Return CoordFrame enumeration.

RotFrame#

Return RotFrame enumeration.

RotMode#

Return RotMode enumeration.

WrapStrategy#

Return WrapStrategy enumeration

dome_trajectory_name#

Return name of the DomeTrajectory component.

instrument_focus#
plate_scale#

Plate scale in mm/arcsec.

ptg_name#

Return name of the pointing component.

Methods Documentation

async add_point_data()#

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.

Return type:

None

azel_from_radec(ra, dec, time=None)#

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

Parameters:
  • ra (float, 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.

  • dec (float, 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.

  • time (astropy.time.core.Time or None, optional) – The time which the coordinate trasformation is intended for. If None (default) use current time.

Returns:

azel – Astropy coordinates with azimuth and elevation.

Return type:

astropy.coordinates.AltAz

async check_dome_following()#

Check if dome following is enabled.

Returns:

dome_followingTrue is enabled False otherwise.

Return type:

bool

async check_tracking(track_duration=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_duration (float or None) – How long should tracking be checked for (second)? Must be a positive float or None (default).

Return type:

None

clear_catalog()#

Clear internal catalog.

Return type:

None

abstract async close_dome()#

Task to close dome.

Return type:

None

abstract async close_m1_cover()#

Task to close m1 cover.

Return type:

None

async disable_dome_following(check=None)#

Disable dome following mode.

Parameters:

check (Any, default: None)

Return type:

None

async enable_dome_following(check=None)#

Enabled dome following mode.

Parameters:

check (Any, default: None)

Return type:

None

async find_target(az, el, mag_limit, mag_range=2.0, radius=0.5)#

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 – Target information.

Return type:

astropy.Table

async find_target_dm_butler(az, el, mag_limit, mag_range=2.0, radius=0.5)#

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:

Name of the target.

Return type:

str

Raises:

RuntimeError: – If DM stack is not available.

async find_target_local_catalog(az, el, mag_limit, mag_range=2.0, radius=0.5)#

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:

Name of the target.

Return type:

str

Raises:

RuntimeError: – If catalog is not loaded. If no object is found.

async find_target_simbad(az, el, mag_limit, mag_range=2.0, radius=0.5)#

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:

Name of the target.

Return type:

str

Raises:

RuntimeError: – If no object is found.

abstract flush_offset_events()#

Abstract method to flush events before and offset is performed.

Return type:

None

abstract async get_bore_sight_angle()#

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

Return type:

float

get_rot_angle_alternatives(rot_angle)#

Generate rotator angle alternatives based on the input rotator angle.

Parameters:

rot_angle (float) – Desired rotator angle (in deg).

Yields:

float – Rotator angle alternatives (in deg).

Return type:

Generator[float, None, None]

get_sun_azel(time_tai=None)#

Get the sun azimuth and elevation.

Parameters:

time_tai (float or None, optional) – TAI timestamp to get sun position. If None compute current tai.

Returns:

Sun elevation and azimuth in degrees.

Return type:

tuple`[`float, float]

get_telescope_and_dome_vent_azimuth()#

Get the telescope and dome vent azimuth.

Return type:

tuple[float, float]

Returns:

  • tel_vent_azimuth (float) – Azimuth to vent the telescope (in deg).

  • dome_vent_azimuth (float) – Azimuth to vent the dome (in deg).

abstract async home_dome()#

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

Return type:

None

is_catalog_loaded()#

Check if catalog is loaded.

Returns:

True if catalog was loaded, False otherwise.

Return type:

bool

list_available_catalogs()#

List of available catalogs to load.

Returns:

catalog_names – Set with the names of the available catalogs.

Return type:

set

See also

load_catalog

Load a catalog from the available set.

load_catalog(catalog_name)#

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.

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.

Return type:

None

list_available_catalogs

List available catalogs to load.

abstract async monitor_position(check=None)#

Monitor and log the position of the telescope and the dome.

Parameters:

check (types.SimpleNamespace or None) – Override self.check for defining which resources are used.

Return type:

None

object_list_add(name, radec)#

Add object to object list.

Parameters:
  • name (str) – Name of the object.

  • object_table (astropy.table.row.Row) – Table row with object information.

  • radec (ICRS)

Return type:

None

object_list_clear()#

Remove all objects stored in the internal object list.

Return type:

None

object_list_get(name)#

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

Parameters:

name (str) – Name of the object.

Returns:

radec – Table row with object information.

Return type:

ICRS

object_list_get_all()#

Return list of objects in the object list.

Returns:

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

Return type:

set

object_list_remove(name)#

Remove object from object list.

Parameters:

name (str) – Object name.

Raises:

RuntimeError – If input object name not in the object list.

Return type:

None

async offset_azel(az, el, relative=True, persistent=None, absorb=False)#

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, if False offset replaces any existing offsets.

  • persistent (bool or None, optional (deprecated)) – (Deprecated) Should the offset be absorbed and persisted between slews? Use of this parameter is deprecated. Use absorb instead.

  • absorb (bool, optional) – Should the offset be absorbed and persisted between slews? (default: False)

Return type:

None

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.

abstract async offset_done()#

Wait for offset events.

Return type:

None

async offset_pa(angle, radius)#

Offset the telescope based on a position angle and radius.

Parameters:
  • angle (float) – Offset position angle, clockwise from North (degrees).

  • radius (float) – Radial offset relative to target position (arcsec).

Return type:

None

async offset_radec(ra, dec, absorb=False)#

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:
  • ra (float) – Offset in ra (arcsec).

  • dec (float or str) – Offset in dec (arcsec).

  • absorb (bool, optional) – Should the offset be absorbed and persisted between slews? (default: False)

Return type:

None

See also

offset_azel

Offset in local AzEl coordinates.

offset_xy

Offsets in the detector X/Y plane.

async offset_rot(rot)#

Apply a rotation offset.

Parameters:

rot (float) – Rotator offset (deg).

Return type:

None

async offset_xy(x, y, relative=True, persistent=None, absorb=False)#

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, if False offset replaces any existing offsets.

  • persistent (bool or None, optional (deprecated)) – (Deprecated) Should the offset be absorbed and persisted between slews? Use of this parameter is deprecated. Use absorb instead.

  • absorb (bool, optional) – Should the offset be absorbed and persisted between slews? (default: False)

Return type:

None

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.

abstract async open_dome_shutter()#

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

Return type:

None

abstract async open_m1_cover()#

Task to open m1 cover.

Return type:

None

parallactic_angle(ra, dec, time=None)#

Return parallactic angle for the given Ra/Dec coordinates.

Parameters:
  • ra (float, 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.

  • dec (float, 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.

  • time (astropy.time.core.Time or None, optional) – The time which the coordinate trasformation is intended for. If None (default) use current time.

Returns:

pa_angle – Parallactic angle.

Return type:

astropy.coordinates.Angle

async point_azel(az, el, rot_tel=0.0, target_name='azel_target', wait_dome=False, slew_timeout=1200.0)#

Slew the telescope to a fixed alt/az position.

Telescope will not track once it arrives in position.

Parameters:
  • az (float, 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

  • el (float 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_tel (float 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_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).

Return type:

None

abstract async prepare_for_flatfield(check=None)#

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

Parameters:

check (types.SimpleNamespace or None) – Override self.check for defining which resources are used.

Return type:

None

abstract async prepare_for_onsky(overrides=None)#

Prepare telescope for on-sky operations.

Parameters:

overrides (dict) – Dictionary with overrides to apply. If None use the recommended overrides.

Return type:

None

radec_from_azel(az, el, time=None)#

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

Parameters:
  • az (float, 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

  • el (float or str) – 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.Time or None, optional) – The time which the coordinate trasformation is intended for. If None (default) use current time.

Returns:

radec_icrs – Astropy coordinates with azimuth and elevation.

Return type:

astropy.coordinates.ICRS

ready_to_offset()#

A context manager to handle preparing the telescope for offset.

By default it does nothing.

Return type:

AsyncIterator[None]

async ready_to_take_data()#

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

Return type:

None

async reset_offsets(absorbed=True, non_absorbed=True)#

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:
  • absorbed (bool) – Reset absorbed offset? Default True.

  • non_absorbed (bool) – Reset non-absorbed offset? Default True.

Raises:

RuntimeError: – If both absorbed and non_absorbed are False.

Return type:

None

static rotation_matrix(angle)#

Rotation matrix.

Parameters:

angle (float)

Return type:

Union[Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], complex, bytes, str, _NestedSequence[complex | bytes | str]]

abstract set_azel_slew_checks(wait_dome)#

Abstract method to handle azEl slew to wait or not for the dome.

Parameters:

wait_dome (bool) – Should point_azel wait for the dome?

Return type:

None

set_rot_angle_alternatives(rot_angle_alternatives)#

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_alternatives (List[float]) – List of rotator angle alternatives (in deg).

Return type:

None

abstract async shutdown()#

Shutdown components.

Return type:

None

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

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

Parameters:
  • ra (float) – Target Right Ascension (hour)

  • dec (float) – Target Declination (degree)

  • rotPA (float) – 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. If self.RotFrame.TARGET uses sky position angle. If self.RotFrame.FIXED uses rotator physical position.

  • rot_track_frame (enum) – 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_mode (enum) – Rotator position mode (self.RotMode). If self.RotMode.FIELD optimize for sky tracking, if self.RotMode.SLIT optimize 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?

  • dDec (float, default: 0.0)

  • az_wrap_strategy (Optional[IntEnum], default: None)

  • time_on_target (float, default: 0.0)

  • offset_x (float | None, default: None)

  • offset_y (float | None, default: None)

Return type:

None

abstract async slew_dome_to(az, check=None, *, timeout=None)#

Utility method to slew dome to a specified position.

Parameters:
  • az (float or str) – Azimuth angle for the dome (in deg).

  • check (types.SimpleNamespace or None) – Override self.check for defining which resources are used.

  • timeout (float, optional) – How long to wait for dome to arrive in position. If None, use the implementation default.

Return type:

None

async slew_ephem_target(ephem_file, target_name, rot_sky=0.0, validate_only=False, slew_timeout=240.0)#

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

Parameters:
  • ephem_file (str) – Name of the file containing ephemeris data.

  • target_name (str) – Target name.

  • rot_sky (float) – Desired instrument position angle (degree), Eastwards from North. Default is 0.0.

  • validate_only (bool, optional) – If True, validate the target without changing the current demand. Default is False.

  • slew_timeout (float, optional) – Timeout for the slew command in seconds, default is 1200 seconds (20 minutes).

Return type:

None

async slew_icrs(ra, dec, rot=0.0, rot_type=RotType.SkyAuto, target_name='slew_icrs', dra=0.0, ddec=0.0, offset_x=None, offset_y=None, az_wrap_strategy=None, time_on_target=0.0, slew_timeout=600.0, stop_before_slew=False, wait_settle=True)#

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

Parameters:
  • ra (float, 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.

  • dec (float, 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.

  • rot (float, 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_type (lsst.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_name (str) – Target name.

  • slew_timeout (float) – Timeout for the slew command (second). Default is 240s.

  • 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 (azWrapStrategy 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_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 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.

Return type:

Tuple[ICRS, Angle]

Returns:

  • radec_icrs (astropy.coordinates.ICRS) – Coordinates used in slew command.

  • rot_angle (astropy.coordinates.Angle) – Angle used in command for rotator.

See also

slew_object

Slew to an object name.

async slew_object(name, rot=0.0, rot_type=RotType.SkyAuto, dra=0.0, ddec=0.0, offset_x=None, offset_y=None, az_wrap_strategy=None, time_on_target=0.0, slew_timeout=240.0)#

Slew to an object name.

Use simbad to resolve the name and get coordinates.

Parameters:
  • name (str) – Target name.

  • rot (float, 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_type (lsst.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_timeout (float, optional) – Timeout for the slew command (second). Default is 240 seconds.

  • 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 (azWrapStrategy 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_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.

Return type:

Tuple[ICRS, Angle]

See also

slew_icrs

Slew to an ICRS coordinates.

async slew_to_planet(planet, rot_sky=0.0, slew_timeout=1200.0)#

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).

Return type:

None

async start_tracking(slew_timeout=1200.0)#

Start tracking the current position of the telescope.

Method returns once telescope and dome are in sync.

Parameters:

slew_timeout (float, default: 1200.0)

Return type:

None

abstract async stop_all()#

Stop telescope and dome.

Return type:

None

async stop_tracking()#

Task to stop telescope tracking.

Return type:

None

abstract async wait_for_inposition(timeout, wait_settle, check=None)#

Wait for both the ATMCS and ATDome to be in position.

Parameters:
  • timeout (float) – How long should it wait before timing out.

  • cmd_ack (CmdAck or None) – CmdAck from the command that started the slew process. This is an experimental feature to discard events that where sent before the slew starts.

  • wait_settle (bool) – After slew complets, add an addional settle wait before returning.

  • check (types.SimpleNamespace or None) – Override self.check for defining which resources are used.

Returns:

status – String with final status.

Return type:

str

async wait_tracking_stopped()#

Task to wait until tracking has stopped.

Return type:

None

Notes

Concrete implementations should override this method. By default it is a no-op.