LJ Archive

Linux, Talon and Astronomy

Tony Steidler-Dennison

Issue #117, January 2004

A new open-source application lets professional and amateur astronomers explore space from their desktops.

We've been fascinated by astronomy since the ancient Chinese first charted the skies. The computerization of astronomy, some would argue, is its greatest leap forward yet. Today, unattended robotic telescopes scan skies that have been charted over centuries, recording their findings in modern databases. CCD cameras capture images impossible to define on film. It's an exciting time to be an astronomer, whether amateur or professional.

The revolution in astronomy doesn't stop at the hardware. Research-grade telescopes in observatories from Spain to Korea are under the control of open-source software and Linux-based computers. Under the open-source model, scientists are free to modify the control software, creating a trickle-down effect that benefits amateurs. Open source and Linux even have changed the scientific method. With source code freely available, peer review now occurs not only on the data, but on the data gathering methods as well.

At the forefront of this open-source astronomy revolution is Talon. Talon was originally developed by Ellwood Downey as the Observatory Control and Astronomical Analysis Software (OCAAS). In 2001, the software was purchased by Torus Technologies of Iowa City, Iowa. In late 2002, Torus was purchased by Optical Mechanics, Inc., and the updated OCAAS package was released as Talon under the GPL.

During the past two years, I've had the daily pleasure of working with Talon. I've installed and configured the software on multiple telescope packages, and I've followed these telescopes to destinations around the world for installation and on-site configuration. It's my pleasure to share with you some of the broad points of Talon installation, configuration and use.

Talon can be downloaded at observatory.sourceforge.net. The software interacts with integrated motion control boards, available from Optical Mechanics, Inc. (Optical Mechanics Motion Controllers) or Oregon Microsystems (PC39 Motion Controllers). Object acquisition and tracking, scheduled operations, environmental monitoring, dome control, image analysis and processing all fall under the control of Talon. Networked operations also are possible using a remote X session.

Using Talon

The Talon package contains a full installation script; install.sh creates a talon user, compiles the binaries and creates a set of text configuration files for initial operation of the telescope.

Talon contains a full compliment of astronomy applications designed specifically for use as a suite of tools. The main Talon interface utilizes the Motif toolset, producing a familiar and unified look and feel throughout the application set. Although the toolset is rich, the following four tools should be of use to most observers.

xobs is the main Talon control window and is launched with the terminal command startTel. It contains all the monitoring and calibration tools necessary for operation. This window provides manual control of the telescope and any attached peripherals, such as a filter wheel or dome control. It also provides a constant display of the current position of the telescope, as calculated by feedback from the motor encoders. This feedback is provided in a set of text boxes within the xobs window.

Figure 1. xobs, the Main Talon Control Screen

When using Talon, the first important task is to find the home position of the various encoders located throughout the system. These encoders close the loop on the operation of the axes, providing a static count for the full travel of each axis. Movement of the telescope is calculated in part by the motion of the chosen axis in relation to the zero position on the encoder. Decrementing the Declination encoder, for example, generally moves the telescope to the north. The operation to find homes in the xobs window hunts for and establishes the zero positions on each axis encoder.

Using the software paddle command in the xobs window (Figure 2), the user can position the telescope, filter wheel and focus position manually. The motion of the telescope to the east and west is referred to as the right ascension (RA) or hour angle (HA) of the telescope. To travel north and south is referred to as Declination (Dec). Using positive and negative encoder counts, moving the telescope axes is a simple matter of moving the axis positive or negative x (RA) or y (Dec). These coordinates are in relation to the North Pole.

Figure 2. The Talon Software Paddle, Used to Move the Telescope Manually

Additionally, Talon provides data on the weather conditions at the observing site with an attached Davis weather station. This feature ensures that the telescope is not exposed to adverse weather conditions during unattended operations. When conditions fall within a predetermined range, the observatory dome or roll-off roof closes, the telescope moves to a stowed position and operations cease. As with the position data, this information is provided in text boxes within the xobs interface.

Finally, xobs provides a search function that allows the user to enter the name of a celestial object, search an internal database and automatically slew the telescope into position to observe and photograph the requested object.

telsched is the element of Talon that makes robotic unattended observing sessions possible. This can be a critical function for institutions conducting research from remote locations or those requiring repeated observations of particular objects over a given period of time.

Figure 3. Telsched, the Talon Operations Scheduling Program

The telsched command opens a scheduler for these unattended observing sessions. The scheduler automatically calculates images to be taken during the session based on the size (in degrees) of the chunk of sky the user selects. In general, the tighter the area of the sky (fewer degrees), the more images taken. Images taken by telsched during an unattended session are stored in a directory of the user's choice. All instructions created by the telsched program are stored in a flat file. These instructions are referenced by xobs when the telescope is slaved off to robotic control from the xobs interface.

Camera is another terminal-launched application in the Talon suite. It provides complete control over the functions of a CCD camera attached to the telescope.

Figure 4. Camera, the Talon Image Processing Application

The camera application includes tools for exposure time, image size, software image filtering and image analysis. Camera also contains tools for adjusting the brightness and contrast of images, determining the area of interest (AOI) of the image and automatically labeling objects by comparison to the World Coordinates System (WCS). The latter tool is, in fact, a pattern-matching algorithm that allows the system to compare known patterns of objects to the WCS database.

xephem provides a software ephemeris, or sky charting interface, for the rest of the Talon suite. As with other ephemerides, it relies heavily on correct geographical and time coordinates; this information can be configured manually by the user. xephem also can be configured to poll an attached GPS at regular intervals, adjusting the system time to account for internal clock drift.

Figure 5. xephem, the Ephemeris Program for Talon

The xephem program, launched from the command line with xephem, provides a granular view of the current sky. Data on each object is provided in a right-click pop-up screen. The user also can point the telescope using this pop-up, a feature used extensively for calibration. Magnification can be increased, effectively looking deeper and deeper into the sky. As an alternative to zooming, the user may select a minimum magnitude (apparent brightness) threshold. This allows brighter stars to be filtered in the ephemeris view, leaving only the dimmer objects in the window. The sky view also may be rotated, and object type filtering is provided. For example, globular clusters can be selected, eliminating the view of all other object types.

Configuration

Configuration files are critical to the operation of Talon. They provide the means by which the software communicates with both the user and the hardware installed in the telescope. In the Linux tradition, these files are simple text files, commented heavily for the clarification of the user. The configuration files for all elements of Talon can be found in /usr/local/telescope/archive/config. Using the default tcsh shell, the simple command cd config moves the user into the configuration directory.

The operation of the telescope can be viewed as two discrete elements, each of which is addressed by a specific configuration file type. First, the internal motion control boards must communicate with the motors and encoders. Configuration files intended to serve this function utilize a .cmc extension. I've always viewed this extension as delineating files that configure motion controllers, cmc for short. The .cmc files establish the operating parameters for the controller boards, which, in turn, send signals to and receive feedback from the encoders and electromechanical components.

The other element of telescope operation is the interface between the user and the software. In simple terms, all user-controlled operations utilize configuration files with a more traditional .cfg extension. Whereas the .cmc files operate behind the scenes to communicate directly with the hardware, the user interface must communicate with the .cfg files.

Critical Configuration Files

Although every configuration file plays a role in the operation of Talon, some in both the .cmc class and the .cfg class bear special attention. These .cmc files include:

  • basic.cmc: establishes the basic communication between the motion control boards and the motors driving the telescope axes.

  • find.cmc: establishes the routines for finding objects based on encoder counts.

  • nodeDec.cmc: establishes the hardware parameters for the Dec axis of the telescope.

  • nodeRA.cmc: establishes the hardware parameters for the RA axis of the telescope.

  • nodeFocus.cmc: establishes the hardware parameters for the telescope focus control.

The .cfg files are:

  • boot.cfg: allows the user to script Talon startup routines. These may include starting GPS monitoring, weather station monitoring and opening the Talon main interface when the computer boots.

  • home.cfg: provides an initial set of constants to allow the telescope to find the home position of each encoder. These constants represent a spatial sense for the telescope prior to working through the initial calibration routines. Once these routines are completed, the actual encoder counts and axis travel are updated automatically.

  • telescoped.cfg: provides constants regarding the telescope axes, establishes the position of physical travel limit switches in relation to the encoders and establishes the maximum rotational velocity of each axis as well as the rotational acceleration rates.

Critical Configuration Settings

The settings in each of the individual .cmc and .cfg files utilize a naming convention that makes their function easily recognizable, but some critical settings within these files deserve special attention. These settings can be modified with any familiar text editor:

  • boot.cfg: establishes the overall parameters of the Talon software at boot.

  • setTelUser: creates the telescope user, the telescope user group and sets the appropriate permissions. By default, the initial telescope user and group are named talon. This can be changed for subsequent use by modifying the setTelUser constant in boot.cfg, provided the new user and group already exist on the system.

  • setTelDaemons: initializes the telescope dæmon (telescoped), camera dæmon (camerad), weather station dæmon (wxd) and global positioning system dæmon (gpsd).

  • home.cfg: provides the following four constants for encoder counts, home position, limit switches and rotational velocity and acceleration:

  • HSTEP: the number of encoder counts in the full rotation of the HA axis encoder.

  • DSTEP: the number of encoder counts in the full rotation of the Dec axis encoder.

  • HSIGN: the physical location of the HA encoder on the telescope. When viewed from the north, the HA encoder will increment clockwise if placed at the back of the polar shaft (the shaft upon which the telescope moves from east to west) or decrement when placed at the front. Another way to view this is, if the marked encoder surface points to the south in the final telescope configuration, it will increment when rotating clockwise. If it points to the north, the encoder will decrement with clockwise rotation. This configuration is a simple constant: 1 if the encoder increments, -1 if it decrements.

  • DSIGN: the physical location of the Dec encoder on the telescope. Much like the HA encoder, the increment/decrement of the encoder varies depending on the method used to mount the encoder. If the encoder is installed with the encoded surface toward the outside of the fork, it decrements when rotated clockwise, or toward the north. This requires a setting of 1. If the encoder is mounted with the encoded surface to the inside of the fork, it increments when rotated clockwise. This requires a setting of -1.

  • telescoped.cfg: provides the following constants for initial operation:

  • HAXIS: the telescope network node from which the HA axis is controlled.

  • DAXIS: the telescope network node from which the Dec axis is controlled.

  • HESTEP: the raw encoder counts per revolution for the HA axis.

  • DESTEP: the raw encoder counts per revolution for the Dec axis.

  • HMAXVEL: the maximum slewing velocity of the HA axis.

  • DMAXVEL: the maximum slewing velocity of the Dec axis.

  • HMAXACC: the maximum slewing acceleration of the HA axis.

  • DMAXACC: the maximum slewing acceleration of the Dec axis.

Using Talon

Putting Talon to use requires a few initial calibration items. As with any telescope, you'll need to check and adjust the polar alignment—the physical location of the telescope in relation to celestial north.

With xobs in the boot.cfg script, the main Talon screen should open right after your desktop loads. From this main screen, select Find Homes (Figure 6). As noted, this routine finds the home mark on each encoder, RA, HA and Focus. From the pop-up window, select All. The telescope should move in all axes. Each axis skips past the home mark initially, backing up incrementally until it finds the mark again. This reduction of each move to the home mark ensures that the telescope ends up precisely on the mark.

Figure 6. Finding Home

The next step is to find limits. This routine locates the telescope's physical limit switches, which prevent the telescope from damaging itself by swinging too far through the travel of each axis. When the switches at both ends of travel are found in an axis, the software writes the location (in encoder counts) to the home.cfg file. You should need to complete the find limits routine only one time.

With the telescope calibrated and aligned, it's time to take some pictures. Open the camera and xephem applications from the command line. Enable telescope control in the xephem options. Select an object by right-clicking in the ephemeris, then select Point Telescope from the resulting pop-up. The telescope should slew to the new position. Click on the camera application and select Take One. With the proper connection to the camera, you'll hear the shutter trip. Within a few seconds, an image of the selected object renders on your screen.

To set up scheduled operations, use the telsched command. In the resulting window, select the size of the mesh, remembering that the tighter the mesh is, the more images taken. Set the time for the operations to start (in UT) and save the schedule file in the default directory. Then pop back out to the main Talon screen and select batch mode. You'll receive a confirmation window. When you select Yes, the Talon application slaves to auto mode. You can cancel auto mode from the main screen. You cannot, however, operate the telescope manually from the main screen while batch mode is in use.

The Talon program is rich with features, providing complete control over the operation of the telescope. Many of the finer features are outlined in the .pdf manual provided in the Talon .tgz file. It's worth a thorough read to understand the telescope interfaces to the control boards and to the software. The manual also contains in-depth information on image processing, solving for WCS solutions, automated and remote operations and finer calibration items that are beyond the scope of this article.

Talon represents a complete leap into the open-source world for astronomers, both professional and amateur. With the robust and networkable nature of Linux, Talon provides a stable platform from which we can do what we've been doing since the beginning of time—viewing, recording and discovering the heavens.

Tony Steidler-Dennison is the director of operations for Optical Mechanics, Inc., and the author of Lockergnome's Penguin Shell newsletter, a twice-weekly tome for Linux users. He maintains Talon on Sourceforge.net and the poli-tech blog “Frankly, I'd Rather Not” at www.steidler.net. He answers all e-mail sent to tony@steidler.net.

LJ Archive