Next: End to End Simulation of the JWST/NIRSpec Instrument
Up: Instrument Modeling
Previous: Instrument Modelling in Observational Astronomy
Table of Contents - Subject Index - Author Index - Search - PS reprint - PDF reprint

Pécontal-Rousset, A., Bacon, R., Copin, Y., Emsellem, E., Ferruit, P., & Pécontal, E. 2003, in ASP Conf. Ser., Vol. 314 Astronomical Data Analysis Software and Systems XIII, eds. F. Ochsenbein, M. Allen, & D. Egret (San Francisco: ASP), 491

Software Tools for 3D spectrography

A. Pécontal-Rousset, R. Bacon, Y. Copin1, E. Emsellem, P. Ferruit, E. Pécontal
Centre de Recherche Astronomique de Lyon, France


Since the very first Tiger prototype operated at the CFHT (June 1987), the Centre de Recherche Astronomique de Lyon (CRAL) has been a very active player in the development of 3D spectrographs and their related softwares, including data acquisition, instrument numerical modelling, data reduction and analysis tools. The CRAL has recently joined the European RTN Euro3D to promote 3D spectrography in Europe, and develop softwares of common interest. In this context, we report here on the past, on-going and future instrumental developments at the CRAL, as well as on the related software packages.

1. 3D spectrography at the CRAL

1.1 1987: first experience

The first experience of 3D spectrography for the CRAL took place at the CFH telescope, on Mauna Kea, in June 1987. The resulting instrument, TIGER (see below) was the first lens-array based integral-field unit experiment, pioneering the optical principle proposed by G. Courtès from the Laboratoire d'Astronomie Spatiale in Marseille (France). This successful experiment prefigured the later large investment the CRAL devoted in such instrumentation. As an illustration of the still alive TIGER concept, Fig. 1 shows one of the lens-arrays used for the SNIFS instrument (225 lenses only).

1.2 The TIGER concept: the ``trick''

The challenge for 3D spectrography is to store three-dimensional (two spatial and one spectral) data on a two-dimensional detector (CCD). How is this possible ?

Using a lens-array solutions, here is the trick. First imagine you have a uniform illumination at the entrance of the lens-array (Fig. 2, left panel). The micro-lens array samples the field and focuses the light into micro-pupils (next 4 panels). This corresponds to the spatial sampling stage of the spectrograph, which additionnally focuses the light into small spots (the so-called micro-pupils), thus compacting the information and providing useful space in between each sample. This free space is used to store the spectral information. The micro-pupils are dispersed via a classical spectrograph (see Fig. 2, last 3 panels). Assuming the dispersion direction is aligned with the CCD columns, a problem quickly arises with spectra from different micro-pupil overlapping along the columns. It is solved by slightly rotating the array. In many circumstances, it may be useful to limit the vertical range using a filter. The overall optical concept is presented in Fig. 3. Note that in the provided illustration, the lenses are squares but any shape allowing good compactness (e.g., hexagonal) can be used (the optimal rotation angle being adapted for each geometry).

Figure 1: The micro-lens array (here the one of SNIFS), the core of the lenslet-based 3D spectrograph.
\epsscale{1.0} \plotone{O5-2_f1.eps}

Figure 2: The ``TIGER trick'' to store 3D data on a 2D detector.
\epsscale{1.0} \plotone{O5-2_f2.eps}

Figure 3: Lens-array based IFU optical design.
\epsscale{0.9} \plotone{O5-2_f3.eps}

1.3 TIGER at the CFHT (1987-1996)

This instrument was a project conducted by two French teams (Lyon and Marseille), and was originally devoted to the study of galactic dynamics, quasars and active galactic nuclei. It allowed acquisition of about 400 spectra of an object simultaneously. The original TIGER instrument was a very basic device, borrowing the mechanical structure of PUMA (Punching Machine, the ancestor of the present Multi-Object Spectrograph), in duty at the CFHT. No specific optimization had been achieved neither for the mechanics nor for the existing optics (Bacon et al. 1995).

It nevertheless provided a number of spectacular results, the first published paper including the spectral identification of the components in the Einstein Cross (Adam et al. 1989). It also allowed the team to investigate the capabilities of such an instrument, and to prospect for the future. On the software side, things were also rather preliminary. A simple toolbox was developed as a MIDAS context, providing basic signal extractions, and requiring a high level of human interactions. No GUI was available at that time.

1.4 OASIS at the CFHT (1997)

OASIS (Optically Adaptative System for Imaging and Spectrography) was the first full 3D project conducted at the CRAL (from its design to its scientific application). It became a general user instrument opened to the CFHT community, and took advantage of the PUEO adaptive optics system. OASIS was a very flexible instrument, handling several spatial and spectral samplings to match the users scientific requirements. It has been commissioned in the summer of 1997 and operated until 2001, with the CFH Telescope becoming a more survey oriented facility (e.g., CFHT Legacy Survey). OASIS thus moved to the William Herschel Telescope (4.2m, La Palma) at the beginning of 2003, and was adapted to be used with the WHT NAOMI AO system. It now offers an even more complete set of spectral and spatial configurations, and should otherwise perform in a similar way as at the CFHT.

The software aspect was challenging, since OASIS has been designed a general user instrument at the CFHT. The community was basically not educated regarding 3D spectrography, and the versatility of OASIS only meant more general (thus more complex) reduction algorithms. Both the acquisition software and the data reduction were GUI oriented, and driven by the firm goal to be as user-friendly as possible. This is illustrated by the acquisition process, during which the observer is asked for quantities which are meaningful to him/her, like the spatial or spectral sampling, instead of instrumental specifications (such as which optical component to include). This also strongly affects the design of the GUI for the data reduction (XOasis, see Fig. 4), which therefore shows the reduction steps in a strict logical order. Moreover, some kind of 'history' is stored in each processed exposure, so that a number of a priori checks can be performed prior to its running. Last but not least, a Web server was set up for software download (, and the users provided with a hot-line service facility.

Figure 4: XOasis GUI for data reduction.

Handling complex data is not just a matter of providing an efficient graphical user-interface. Since the instrument had multiple optical configurations, the best way to properly and accurately extract the user data, without a high level knowledge of the instrument, was to implement a data extraction process based on an instrument numerical model. This was probably the major software investment, which still benefits both users and conceptors. This allows more accurate extraction and calibration of the data, distinguishing the different dispersion orders (for low spectral resolution configurations) and mimicking the optical distortions and aberrations (achromatism) of the instrument.

Two other development decisions, taken at that time, appeared to be critical for the future: first, the elaboration of a C Input/Output libraries handling multiple common-used formats, like FITS of course (based on the cfitsio routines), but also MIDAS (.bdf, .tbl), IRAF (.imh, .pix) or the STSDAS tables. The aim was to make the processed data compatible, at any reduction step, with the user's favorite tools. Facilities to import and export from these various formats were also provided. The second point concerns the global architecture. Each processing module is an executable (i.e., Unix binary), running as a stand-alone routine. Parameters may be passed through the command line. The GUI is built as a separate front-end passing the parameters to the module through the command line, plus some fancy features like saving the session history, providing an electronic logbook, etc. Given that layout, the data reduction process can easily be operated in batch mode through a pipeline, or via user-written shell scripts, or in interactive mode via the GUI. All processing share the same module basis, serving maintenance tasks.

1.5 SAURON at the WHT (1999)

SAURON was the first IFU dedicated to a specific science case. It is a panoramic integral-field spectrograph for ``understanding the formation and evolution of elliptical and lenticular galaxies and of spiral bulges from 3D-observations'' ( This instrument has a large field of view and was optimized to have a high throughput (20% including atmosphere, telescope and detector), and to allow simultaneous sky subtraction. SAURON has been designed for studies of the stellar kinematics, gas kinematics, and line-strength distributions of nearby early-type galaxies. The project was carried out by a consortium gathering the CRAL and two European teams: the Sterrewacht Leiden and Oxford University. The instrument was installed at the WHT in 1999 and provided impressive results so far (de Zeeuw et al. 2002).

The XSauron software shares with XOasis most of the data reduction modules (with different parameter values for the instrument numerical model). It has been enhanced with new analysis tools developed by the consortium. But as a survey instrument, SAURON also required the building of a true pipeline. A first ``linear'' pipeline (based mostly on Tcl modules plus a global wrapper) was developed in Lyon, and a more robust pipeline (Jython, etc) is being tested at the Sterrewacht Leiden.

1.6 SNIFS at UH (2004)

A recent addition to the suite of IFUs developed in Lyon is the Supernova Integral Field Spectrograph (SNIFS), another science-case dedicated instrument (Aldering et al. 2002). SNIFS has been designed to provide a systematic spectroscopic follow-up of Supernovae Ia. This project is a partnership between LBNL (Berkeley), LPNHE (Paris), IPNL (Lyon) and CRAL. The instrument will be operated for 3 years at the UH Telescope (Hawaii), for a total of 20 percent of the nights.

SNIFS is a two-channel optical spectrograph equipped with a micro-lens array (TIGER type) integral field unit (Lantz et al. 2003). The blue channel will cover 3500-5700 Å, while the red channel will cover 5300-10500 Å. SNIFS includes a photometry camera run in parallel with the spectrograph; it allows photometric normalization of the spectrographic observations even under non-photometric sky conditions. SNIFS is also equipped with a calibration unit for the spectrograph which will provide the relevant spectral flats and arc exposures. The intended operational mode for SNIFS is quasi queue observing. Target coordinates and exposure sequences are generated automatically.

On the software side, this was the first time a full numerical simulation of the instrument was used to confirm building options and to deeply check the data reduction process before the instrument is put in operation. Given the heavy use of the instrument, a fully-automated processing pipeline is being designed by the IPNL team, based on previous XOasis and XSauron reduction modules, as well as a scheduler, built by the LBNL team, to afford and optimize the observational procedure.

2. The new generation: using slices

Figure 5: Slices prototype tested in the CRAL

Figure 6: Image slicer optical concept (from Allington Smith et Content, Univ. of Durham)

To avoid spectra to be polluted by the other dispersion orders (low dispersion configurations), but also to increase data compactness on the detector, the CRAL investigates a new type of 3D spectrographs using slicers (see Fig. 5, the active surface being on the left). Each slice cuts a strip in the field of view. Each strip is then dispersed and gathered on a detector, with a slight shift with respect to the previous one induced by the slight angle given to the slices (see Fig. 6). The current corresponding studies held in the CRAL are:

MUSE Phase A study (VLT-2)
The major scientific goal is deep spectrographic observations of high-$z$ galaxies, in particular of Ly$\alpha$ emitters. The Principal Investigator of the MUSE project is R. Bacon (CRAL). The field of view being rather large for such a spectrograph (1 square arc-minute), the field is sampled in 24 sub-fields, which thus results in 24 spectrographic channels. CRAL is in charge of many software aspects, AIP (Postdam) being responsible for the data reduction package.

NIRSpec provides users of JWST with the ability to obtain simultaneous spectra of more than a hundred objects in a 9 square arc-minute field of view. The baseline spectrograph will take advantage of a micro-electromechanical system (MEMS) to provide dynamic aperture shutter masks. The CRAL is involved in the phase A study for an IFU mode, and deeply involved in the instrument numerical model (Gnata et al. 2004).

ESA prototype
Slicer feasibility study for NIRSpec.

The Supernova/Acceleration Probe (SNAP) Mission is expected to provide an understanding of the mechanism driving the acceleration of the universe. The satellite observatory is capable of measuring up to 2,000 distant supernovae during the three-year mission lifetime. The CRAL is involved in calibration scenarii and performance evaluations.

3. The growing amount of data

One of the major challenges IFU software will face in the next years, as for many other instruments used for surveys, is the data flow. The amount of data produced at once is growing continuously, as shown in Table 1. Parallel processing would be straightforward for instruments having multiple channels, like MUSE. But some software improvements or new tools will be required to handle these data, such as data mining tools. One cannot imagine checking data quality of 90,000 spectra without any robust tools detecting some unexpected feature for you, nor trying to view at once the full dataset.
\scriptsize\tablecaption{Increasing volume of data pe...
...etext{*}{Not a CRAL-made IFU, given for comparison with Muse.}

4. Reaching the EURO3D RTN...

The goal of the Euro3D Research & Training Network, founded by the European Commission, is to convert integral-field spectrography from a technique reserved to experts to a common-user and powerful observational tool. The RTN is a partnership between 11 partner institutes, namely: AIP (Potsdam; PI of the RTN being Martin M. Roth), Cambridge, Durham, ESO Garching, MPE Garching, Leiden, CRAL (Lyon), LAM (Marseille), Milano, Paris and IAC (Tenerife), alltogether operating 14 different IFUs.

To promote 3D spectrography in Europe, the RTN will train 10 post-doc during two years, focus on common scientific projects (7 have been identified) and develop state-of-the-art data analysis software.

Here is the list of the software work-packages the RTN is in charge of:

4.1 Euro3D data format

As integral field spectrographs become more common around the world and in Europe in particular, the need for a common data format was recognized as a critical asset which would benefit all potential users. Here, we present the Euro3D format that is adapted as a post-instrumental-signature-removal format for all instruments within the Euro3D network. It follows the FITS standard, and includes several extensions all of them being binary FITS tables. Fig. 7 is intended to provide a comprehensive overview of the format. It consists mainly of a binary table extension, storing each spatial sample (spaxel: SPAtial piXture ELement) ID, its coordinates and the associated data, ie. signal, data quality and variance. A second extension contains the group description, in case several kinds of spaxels have been glued in a single datacube. For detailed information on this format, please refer to Kissler-Patig et al. 2003 and to the Euro3D Data Format Definition Document on the Euro3D Web server (

Figure 7: Euro3D file format

4.2 E3D LCL I/O library

Since the development time-scales for the Euro3D analysis tools are short, the I/O library needed to be available quickly. It was decided to use an existing library, the Lyon IFU I/O library, as a starting point. This I/O library is part of a larger software ``suite'' developed in Lyon. The Lyon C Library (LCL) results from the extension by A. Pécontal-Rousset of the IFU I/O library to include the Euro3D-format specific I/O and others dedicated routines to handle new features, like groups or spaxels. It provides transparent access to FITS files (including E3D datacubes), and benefits from already existing features such as command-line arguments and error handling tools.

The LCL is written in ANSI C (callable from C++), and the systematic use of the GNU autoconf and automake tools insures good portability to any Unix system. The low-level FITS I/O access routines use the cfitsio library ( implying very good FITS compliance (even if the FITS format evolves), and a high reliability and long-term maintenance (see Fig. 8).

Figure 8: Euro3D I/O libraries

The latest stable version (presently only distributed internally) can be downloaded from the Euro3D website (, cf. password protected internal pages). What you can get there is:

The Euro3D I/O Lyon C Library is now made available inside the Euro3D RTN. It has not yet been released externally, but people interested in such features are encouraged to contact the RTN PI or Arlette Pécontal-Rousset.


Adam, G. et al. 1989, Astronomy and Astrophysics, 208, 15-18

Aldering, G. et al. 2002, SPIE Proceedings ``Survey and Other Telescope Technologies and Discoveries'', 4836, 61-72

Bacon, R. et al. 1995, Astronomy and Astrophysics Supplement, 113, 347

de Zeeuw P.T. et al. 2002, MNRAS, 329, 513

Gnata, X. 2004, this volume, 501

Kissler-Patig, M. et al., 2003, Astron. Nachr., (in press)

Lantz, B. et al., 2003, SPIE Proceedings ``Optical systems design'' (in press)

Pecontal-Rousset, A. et al. 2003, Astron. Nachr., (in press)

Sanchez, S. 2004, this volume, 517


... Copin1
Institut de Physique Nucléaire de Lyon, France

© Copyright 2004 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA
Next: End to End Simulation of the JWST/NIRSpec Instrument
Up: Instrument Modeling
Previous: Instrument Modelling in Observational Astronomy
Table of Contents - Subject Index - Author Index - Search - PS reprint - PDF reprint