Allen Keel Center of Excellence in Information Systems Tennessee State University (August 20, 2001)
One of the bigger operational challenges of running any telescope is scheduling the observations so that the telescope runs efficiently and actually makes the observations one wants. This is especially true for automatic telescopes, which must choose stars from prioritized lists without any real-time intervention. To find the best (or, rather, an acceptable) way of doing this, we decided to simulate the operation of the telescope with a computer program that can incorporate the scheduling algorithm used by the telescope to make the actual observations. We wrote the first version of this program as a summer project by Allen Keel and tested its operation by comparing the distribution of stars predicted with the distribution from an actual night's observing by the telescope.
The main objective of this summer project was to create a computer program, using the C language, that simulates the operation of the AST. The program inputs data from a text list of stars, selects stars on the basis of a certain scheduling algorithm, decides which stars to observe and in which order and time, determines the times to start and finish each observation, and records all of the observations and corresponding star data in log files that are suitable for plotting. We intended this program to be an evolving prototype; in its practical application at the telescope, it will be augmented by an ATIS (Automatic Telescope Instruction Set) interpreter, and eventually it will have many more checks for the validity of telescopic moves and observations.
The simulator starts out by determining the times to begin and finish observing for the night based on the position of the sun in the sky and the universal time. The universal time to start observing is determined from the critical solar zenith distance for the calendar date that the user enters. The setup is completed by calculating the length of the night, which is the difference in the sidereal times for the beginning and end of the night.
The next portion of the program reads in data from an existing input file of stars. The star data include the Star ID (normally HD number), RA (right ascension), declination, V magnitude, B-V color, spectrum, exposure time, type of observation, Julian Date of observation (in case observing at a specific time is required), and general priority. Variables for keeping track of observations are set up for each star, so that a "priority variable" for the next observation may be defined and updated. The nutations, precessions, and aberrations of the stars are all accounted for through respective functions that calculate these effects.
A significant section of the project was to allow the computer to make decisions about observations, scheduling in accordance with a scheduling algorithm. Our original scheme was intended to roughly mimic the ATIS scheduling algorithm used on the automatic photometric telescopes. In those telescopes, stars to the west get progressively higher priority so that the APTs begin observing stars ready to set, then work eastward, ending the night picking off stars in the east as they are rising. Obviously, this scheme has to be modified for an alt-azimuth telescope. We start with a general priority for observing a given star. Then we modify it by increasing it if: (a) the star is low in the west, ready to pass out of sight and (b) if the star is low in the south so it won't be up very long. We also check to see if it is too close to the zenith, or horizon, or the moon (<10 degrees) to observe. We also apply a weighting scheme that discriminates against slews greater than 1 radian in either azimuth or tilt. After observing a star, the program decreases its general priority by 1.0. The scheme for calculating the instantaneous priority for the next observation thus depends on the star's hour angle and zenith distance, with a correction for the length of a slew to the next observation. We use this algorithm determine which star has the highest priority for the next observation.
The duration of a single observation consists of the time to slew to the next star chosen, to acquire it and begin tracking it, and to communicate its status to the computer to control the spectrograph. Once the telescope acquires the star, the time required to set the observation up, make it, and record the data is all calculated by subroutines in the program.
Log files are created to record the stars' positions in the sky at the time they are observed by the telescope. Whenever the computer program chooses a star to observe, the RA and declination of the star are written to one log file, and its azimuth and zenith distance are recorded onto a separate log file. The data from these log files can be easily plotted using XYPLOT, a program written by Greg Henry with the CalTech PGPLOT package. Watching the dots for the stars appear on the plot gives a very good idea of how efficiently the scheduler is carrying out the observing program.
We have applied this simulator to a list of stars for Patrick Wallace's TPOINT program, which we have used to construct a mount model for the telescope. Figure 1 and Figure 2 show the distribution of stars for 6/23/2001 in Azimuth-ZD and RA-Declination, respectively. The duration of observations was about 2.5 hours, roughly the time it actually took the telescope to acquire and center these stars automatically.

Figure 1

Figure 2
Mike Williamson incorporated roughly the same scheduling algorithm into the telescope control system in June 2001 and used it to acquire the same stars. The distribution of stars in Azimuth-ZD is shown in Figure 3. The algorithms were not exactly the same because of an error in the moon-avoidance calculations we used at the telescope, but the results are remarkably similar.

Figure 3