next up previous gif 63 kB PostScript reprint
Next: The Data Analysis Up: Software Systems Previous: The Array Limited

Astronomical Data Analysis Software and Systems IV
ASP Conference Series, Vol. 77, 1995
Book Editors: R. A. Shaw, H. E. Payne, and J. J. E. Hayes
Electronic Editor: H. E. Payne

The SAX-LEGSPC Data Reduction and Analysis System: An Example of a Minimalist Approach

F. Favata, A. N. Parmar, U. Lammers, G. Vacanti, M. Busetta

Astrophysics Division, ESA/ESTEC, P.O. Box 299, 2200 AG Noordwijk, The Netherlands

J. J. Mathieu, P. Isherwood

Mathematics and Software Division, ESA/ESTEC, P.O. Box 299, 2200 AG Noordwijk, The Netherlands



We present the data reduction and analysis system for the Low Energy Gas Scintillation Proportional Counter to be flown on the Italian-Dutch X-ray satellite SAX. The design philosophy of the system is presented, describing the design constraints and discussing the various choices made. Also, the problems encountered in following the chosen approach are described. In particular, the advantages and disadvantages of using FITS for all the steps in the data analysis chain are discussed.


The Low Energy Gas Scintillation Proportional Counter (hereafter, LEGSPC) is one of the instruments flying on the Italian--Dutch X-ray mission SAX (Scarsi 1993), which will be launched in early 1996. The instrument is being provided from the Astrophysics Division of the European Space Agency at ESTEC, and is described in detail by Favata & Smith (1989), Parmar et al. (1990), and Erd & Bavdaz (1992). It is an imaging spectrometer, sitting behind a set of nested double cone mirrors that approximate Wolter type I.

We are currently implementing the data reduction and analysis system which will allow the observer to go from the raw telemetry tapes (or ``final observation tapes,'' FOTs) being provided by the spacecraft operator (Telespazio), to the extraction of scientific results.

Design Choices

Given the characteristics of the detector and the limited resource level, we have made some radical design choices early on.

Detector Characteristics, Strong Points, and Limitations

The LEGSPC has a large energy coverage (almost two decades in energy) with good spectral resolution (actually better than current CCD detectors at the lowest energies, reaching about 28% full width at half maximum (FWHM) at the C 280eV line), with relatively modest imaging capabilities (about 1arcmin FWHM on-axis, with rather extended wings). Additionally, the front window has a support structure in the form of a grid with an approximate 4arcmin pitch, and the mirror point response function rapidly assumes an irregular shape with increasing off-axis angle. Therefore the best usage of the instrument will be for spectroscopy of on-axis point sources, and the complete data-analysis chain is tuned to this purpose, rather than, for example, the analysis of extended sources.

On the other hand, one of the nice features of the LEGSPC is that the raw data coming out of the detector are already rather clean, and only need a relatively small amount of processing before being scientifically useful.

Two calibration sources are constantly shining in the field of view provide continuous monitoring of the gain, and therefore an easy to use reference point against which to monitor the performance of the detector.

Resource Limitations

The level of resources available internally to support the data analysis system set-up activities was limited to about 2.5 person-years per year, starting about 2 years before launch. This limit meant that nice-to-haves were excluded from the beginning and, given that we had to handle the data from the raw telemetry state down to final science, we had to concentrate on the truly essential tasks.

Baseline Design Requirements

Our baseline design approach has therefore been to set up an analysis system which would satisfy several criteria: The system must allow for cleaning of the LEGSPC photon lists, and remove all known instrumental effects (e.g., linearization of energy and x-y coordinates). It must allow for extraction of cleaned spectra of on-axis point sources for further scientific analysis. The system must also be optimized for in-house usage; its eventual integration with software for other SAX instruments, and eventual distribution and support to guest observers, must be provided by a team set up by the Italian Space Agency (ASI). Finally, although the system was written keeping portability in mind, it is being developed and run only on SunOS platforms, with no effort being made to provide multi-platform support.

Design Choices

To be able to complete the task within the limited amount of resources available we have decided to adopt a minimalist approach, i.e., to reuse as much available software as possible, and to concentrate on the instrument-specific stages (i.e., event cleaning and linearization, building of the detector response matrix). We left the generic tasks (image display, spectral extraction and fitting, etc.) to existing software.

File Formats: FITS and Others

First and foremost among the design choices was the selection of a file format. Driven by the aim of recycling existing software as much as possible we have chosen to adopt FITS, and in particular the use of binary tables for storing event lists. Given the large number of tools available for the reduction and analysis of ASCA data in FITS format, and given that FITS will most likely be adopted by forthcoming X-ray missions, we decided to adopt, as much as possible, a format adhering to the specifications for ASCA event lists and house-keeping (HK) files as produced by the HEASARC group at Goddard Space Flight Center. This immediately gave us the possibility of using the set of software tools produced by HEASARC known as FTOOLS. These include tools for performing elementary operations on FITS binary tables, tools for selecting events from a table based on arbitrary complex selection criteria, and building 1-D and 2-D histograms (images) from event lists, etc.

We have additionally decided to use FITS as the format for the calibration files, adopting an approach similar to the one used by HEASARC for the ASCA calibration database. We have used, for setting up the calibration database, the same software tools distributed by HEASARC ( caltools), which allow to keep the indexing of calibration products and to retrieve automatically the correct calibration product for the observation being analyzed. As for the format of the calibration files, we have found that many of the HEASARC suggested formats were, while aiming to be very general, too complex or unnatural for our instrument, and have therefore decided to define our own formats which follow the data types at hand in a more natural way.

Disadvantages of FITS

While the advantages of using FITS for our data from the start of the chain should be evident from the previous section (e.g., the large body of software usable as-is, the ease of archiving and of sharing the data), we have found that this comes at the price of a significant amount of work in defining the files formats and keywords and in checking that the chosen format is actually compatible with the large body of software that we are going to use. As for the other supposed disadvantages of FITS, namely the inefficiencies both in terms of sheer file size and of I/O requirements, we have found that, with our typical data sizes (an observation file set being of order 10 MB in size) and with the speed of modern machines and the size of modern disks, these disadvantages are almost negligible, and that the choice of a more efficient but non-standard file format is therefore not justified.

The Reduction System

Starting from the raw telemetry tapes the data files go through the following steps:

  1. conversion to FITS

  2. non-interactive linearization

  3. non-interactive selection of Good Time Intervals (GTI)

  4. (optional) interactive selection of Good Time Intervals (GTI)

  5. filtering of the data based on the GTI files produced above

  6. interactive extraction of the spectrum of a source (PHA file), using XSELECT and SAOimage as image analysis tools

  7. building of the response matrix for the extracted spectrum file

  8. spectral fitting of the resulting spectrum using XSPEC

Calibration Data

To analyze the calibration data, thanks to the fact that the data produced during ground calibration by the electronic ground support equipment have essentially the same format as the flight data, we are using the same tools and the same approach as we will take for the flight data. This gives us the possibility of thoroughly testing the data analysis chain before flight.


The adoption of FITS and the extensive recycling of existing software has allowed us to put together a complete data analysis chain for the SAX LEGSPC detector using a relatively small amount of resources. This task would not have been possible, within the same resource constraint, by using a more traditional approach of re-designing everything from scratch in-house, even using fancy environments such as IDL.


Erd, C., & Bavdaz, M. 1992, in EUV, X-Ray, and Gamma-Ray Instrumentation in Astronomy III, SPIE Conference Proceedings, Vol. 1743 (Bellingham, SPIE), p. 133

Favata, F., & Smith, A. 1989, in EUV, X-ray and Gamma-Ray Instrumentation for Astronomy and Atomic Physics, SPIE Conference Proceedings, Vol. 1159 (Bellingham, SPIE), p. 488

Parmar, A. N., Smith, A., Bavdaz, M. 1990, in Observatories in Earth Orbit and Beyond, ed. Y. Kondo, (Dordrecht, Kluwer)

Scarsi, L. 1993, A&AS, 97, 371

next up previous gif 63 kB PostScript reprint
Next: The Data Analysis Up: Software Systems Previous: The Array Limited