Open Source Asteroid Software Project

In this paper, the creation of a complete suite of open-source asteroid-related software is proposed. What follows is both a description of what would be created, and an effort to stir up some interest among programming astronomers in making it a reality.

What the software will be: Ideally, we would have a complete suite of the basic programs needed by amateurs and professionals doing asteroid-related work: image processing, automated astrometry/photometry and detection of moving objects, telescope and CCD control, and orbit determination.

The project ought to provide everything most amateurs need to get an astrometric station set up, and important parts of what would be needed for a professional research project. Its results could be used for projects of any scale, from a backyard astrometrist with a Cookbook CCD up to LONEOS or LINEAR-sized jobs, controlled through scripting languages and/or hooked directly into programs.

How it differs from the software we already have: There is already an immense amount of asteroid-related software out there, and one could reasonably ask how the software proposed would be any different:

  • The software would be open source (perhaps licensed under the GPL.) Almost all astrometry done by amateurs involves closed-source software; the shift to open-source would bring many great advantages. It would end a tremendous waste of talent that currently goes into duplicated efforts. For example, there are probably a few dozen people who have written code to extract a list of objects (x, y, magnitude) from an image. Ideally, we could all use (say) SExtractor, and devote our time to building new code.
  • Going to an open-source model would also make verifying the correctness of results. At present, many people create their own astrometry software from scratch, out of a lack of trust in software without source code. This lack of trust is really somewhat misplaced; packages such as Astrometrica, PinPoint, CCD Astrometry, and Charon have been tested by hundreds of people; "self-made" software is usually tested only by oneself, and can never hope to be as trustworthy as the more heavily-used programs. Still, opening the source code might dispel the remaining doubts. It would also encourage people to add new code to the combined efforts, instead of reinventing the wheel.

  • The software would be modular/component based. Almost all current asteroid-related software tends to be highly monolithic. For example, a program to do astrometric reduction of a CCD image ideally should break up into the following cleanly separable pieces:
  • (1) A component to load FITS and other images into memory.

    (2) A component to examine such an image and create a list of objects found in it. (This is basically what the SExtractor software does.)

    (3) A component to extract a list of stars from an astrometric catalog, for a given area in the sky, from a file or via Internet.

    (4) A component to "pattern-match" the results of (2) and (3), so one can get the plate constants relating image coordinates to RA/dec.

    Naturally, there would be many other pieces required or desirable. There would be basic astronomical calculations such as planetary/asteroid positions, creating astrometric reports in the MPC format, and so on. The key point is that each piece can be examined and used independently. A programmer with a great new idea for detecting objects in an image can modify component (2) without having to re-invent every other component, or even really needing to have much understanding of how the other pieces work. (We are really somewhat lucky in this regard. Most software projects are not as cleanly divisible into discrete pieces.)

  • The source code would be readily understandable. This would be a major departure from previous practice. In the amateur world, most software is closed-source. The open-source code on the professional side, however, is usually almost impossible to use. This shouldn't be a surprise. Most of the code is written by people whose primary objective is to get their jobs done, rather than to write reusable code. The fact that the code may be a messy, cryptic, undocumented monolith is of no great importance to them. But for this project, it is of tremendous importance. People won't re-use code they don't understand.
  • This is a potential sticky point. Documenting code and making the flow of its logic and algorithms cleanly apparent is a difficult and time-consuming job, and most people have no good reason to do it. Even in the commercial software world, where it is of greater importance, "clean code" is talked about more than it is written.

  • The software would work on multiple operating systems (DOS/Windows and Unix/Linux). The main reason for that requirement is that amateurs almost uniformly use DOS/Windows machines, and professional astronomers commonly use a mix of other machines. If the software is to be in common use, crossing platforms will be almost essential.
  • The software would be user-friendly. This is another split in the amateur/professional world: the DOS/Windows-based software used by amateurs is generally easy to use, while software such as IRAF that is commonly used by professionals is highly user-abusive.
  • Benefits of this project: As discussed above, if source code such as the above were available, developers could focus on creating new code instead of re-writing old code. This should accelerate development of new capabilities.

    The cost benefit (free software) ought to prove inviting to many potential astrometrists. At the end of the project, it should be possible for anyone with a motorized telescope and CCD camera to do highly-automated astrometry, without having to buy any software at all. Those with an unusual telescope or unusual CCD might have to write some software to control it, or (more probably) wait for someone else to do so. But in many cases, people who would not normally consider this area will suddenly find it much more tempting.

    The results of this project would be of great educational use, on several levels. As an example of the most basic level, there are already several people using the freeware Find_Orb software to teach the basics of astrometry and orbit determination. In fact, Find_Orb was originally designed for almost purely educational use; it requires considerable user interaction to get an orbit, so that the user can get a feel for the techniques involved. More advanced students can take advantage of the source code, getting some idea of the details of the underlying theory in these areas. (Admittedly, looking at math is almost always preferable to looking at source code, but there are situations where the step-by-step detail of source code is essential.)

    Expected problems in completing this project: Software of this sort is currently rare. There is little incentive to write software usable by both the professional and amateur communities, and creating source code that is thoroughly documented and reusable is immensely time-consuming. The benefits of clean, open source are sufficiently subtle, long-term, and spread widely enough that they are easy to ignore.

    Those writing software for amateurs almost never open their source code. Those writing software for professionals regard software as a one-shot tool to get their projects completed, rather than as something to be developed and re-used. These are predominantly "state of mind" obstacles, however, and can probably be overcome in some cases if people perceive enough benefits.

    Some currently-available open source asteroid software: I've been slowly converting most of my own software to this model. The major barrier has been documentation and making the source code easily understood by others. Despite that, many of the components for asteroid-related software are now posted on my Web site, and I expect to have an "automated astrometry" program that fits this model shortly. (The code exists and has been posted, but is not as modular or easy to follow as it ought to be.) Further components will be posted as time allows, and I have hopes that others can be persuaded to add to this effort.