A List of Useful APF Scripts

A number of scripts have been developed to control the APF from the command line. These are preferable to using the GUI because these scripts obey the permission keywords. Therefore, these can prevent the user from opening the dome when it is, say, raining.

Basic operations

  1. slew - Usage: slew [-ny] [-a az] [-e el] [-r ra] [-d dec] - Moves the telescope to a specified Az and El. Can move to a specified RA and Dec but does not take the proper motion keywords, so is less than useful for science use. Can park the telescope.
  2. shutters - Usage: shutters [-n] [-c] [-o] [-f pos] [-r pos] - Moves the shutters to a specfied position or to a handful of useful defaults.

Ensemble Operations

These operations are required to open or close the telescope and dome.

  1. clear_estop - clears the emergency stop state. This is set when an emergency stop is set and then cleared.
  2. set_estop - sets the emergency stop state. This does not engage an emergency stop, but sets the state. Thus, this will remove power from the telescope and dome.
  3. enable_dome_azdrive - turns on the Azimuth drive, which is required for doing anything with the dome or telescope
  4. disable_dome_azdrive - turns off the Azimuth drive, which is required for doing anything with the dome or telescope
  5. open_mirror_cover - opens the mirror covers.
  6. close_mirror_cover - closes the mirror covers.
  7. park_telescope - places the telescope in the Park position. This moves the Azimuth, Elevation, Tertiary and Secondary mirrors to the park positions. These positions are software preset values.
  8. home_telescope - moves the telescope to the home position for all four components, Azimuth, Elevation, Tertiary and Secondary mirrors. Homing is important for ensuring that the firmware knows what the encoder values mean, it moves the telescope to absolute reference values. This opens the mirror covers if it needs to.
  9. prep-obs - prepares for observations. This procedure sets a number of sensible defaults for software (for the guider exposure time or output directory for data files, for example) along with setting up the instrument defaults (Iodine Cell, spectrometer hatch, etc.)
  10. openatsunset - this opens the dome and telescope for optimal equilibration during twilight, but this does not setup the facility for actual observations. Can always be run.
  11. openatnight - prepares the dome, telescope and spectrometer for actual on-sky science operations. This is what should be called after twilight ends, whether or not the telescope and dome are open.
  12. closeup - runs the full sequence of operations to shut the telescope, dome and spectrometer up for the night. Can always be run, so shoud be schedule at sunrise regardless of how the dome and telescope was closed.

Calibration Operations

  1. measure_focus.py - can measure the M2 focus, -h for help
  2. check_focus.py - checks the M2 focus by pistoning the M2 far from the current position, if the offset is large (where large an option) it will report this. Leaves M2 back at original position.
  3. calibrate - takes a series of calibration exposures (ThAr arcs, flatfields). There are two preset combinations, ucsc and ucb, but others can be defined.
  4. focuscube - takes a series of exposures of halogen flats through the Iodine cell while moving the spectrometer dewar focus stage. Nominal focus is usually 8500

Observational Operations

Each of these is part of the larger scriptobs facility. The full manual for that can be found in the robot manual.

  1. autoexposure - automatically sets the guider exposure times and the number of frames to sum
  2. centerup - centers the brightest star in the search radius of the guider on the current slit center.
  3. slewlock - given a set of coordinates, slews the telescope to that position, then runs autoexposure and centerup, note does not use slew as slew does not currently take proper motion arguments
  4. scriptobs - takes a starlist and observes every object in the list if possible.

Table Of Contents

Previous topic

Manually Readying the Telescope

Next topic

What Software is needed and where?

This Page