Starlink Project
Starlink Cookbook 3.2-0

Martin Clayton

10 July 2003

Copyright © 2000, 2003 Council for the Central Laboratory of the Research Councils

Echelle Data Reduction Cookbook


A collapsed Echelle spectrum


This document is the first version of the Starlink Echelle Data Reduction Cookbook. It contains scripts and procedures developed by regular or heavy users of the existing software packages. These scripts are generally of two types; templates which readers may be able to modify to suit their particular needs and utilities which carry out a particular common task and can probably be used ‘off-the-shelf’.

In the nature of this subject the recipes given are quite strongly tied to the software packages, rather than being science-data led. The major part of this document is divided into two sections dealing with scripts to be used with IRAF and with Starlink software.


1 Other Sources of Information
2 Acknowledgements
3 Starlink
 3.5 Automated ECHOMOP reductions
  3.5.1 PREPRUN1 & PREPRUN2 – Set up automated run
  3.5.2 PREPBIAS – Prepare bias frame
  3.5.3 PREPFLAT – Prepare Flat-field frame
  3.5.4 PREPARCS – Prepare arc frames
  3.5.5 PREPOBJS – Prepare object frames
  3.5.6 ECHRDARC – Reduce arc frames
  3.5.7 ECHRDUCE – Reduce object frames
5 Script source code

Summary of the Available Scripts

The scripts included are the following:

takes the weighted mean wavelength scale from two échelle arcs and applies it to an object spectrum. The weighting scheme is based on the times of the observations.
takes a ‘collapsed’ échelle spectrum (e.g. from ECHOMOP) and produces a series of NDF files each containing a single order of the spectrum.
takes a collapsed échelle spectrum and reads the orders into a DIPSO stack.
TRACEPOLY extracts the trace fit curve parameters from an ECHOMOP reduction structure file and lists them. ARCPOLY similarly extracts the polynomials describing the wavelength scales and lists them.
Automated ECHOMOP reduction
takes the raw CCD data from an observing run and manages the CCD processing as well as running ECHOMOP. Scripts for doing each of the sub-tasks involved are provided.
(IRAF) normalises and applies a flat field to an échelle image on an order-by-order basis.
(IRAF) extracts orders from a wavelength-calibrated échelle spectrum and converts to velocity at a specified wavelength, each order is output to a separate file.
(IRAF) trims the orders of a collapsed échelle spectrum (in IRAF format) according to limits in a file provided.

Although the scripts are each for a specific purpose, you may well find that the task addressed closely matches your objective.

General Notes on the Scripts

In this document each of the scripts is described in outline.

At Starlink sites you should find copies of the complete scripts in the directory


Some of the scripts are available in different flavours. For example the stackgen script is available in two versions – one for FIGARO ECHARC data, one for ECHOMOP data. These scripts are both in the examples directory and named stackgen_echarc and stackgen_echomop respectively.

The scripts are self documenting. I’ve commented them in places where they might be adapted to other purposes. The scripts may seem a little long as they contain many comments – this is to aid those wishing to make use of them as templates for their own work.

The C shell is used for most of the Starlink scripts and IRAF cl for the IRAF scripts.

Please Contribute

To be really useful this cookbook should contain as many of the tools and tricks used by échelle workers as possible. If you have a handy script, or are aware of one, please contribute it by contacting the author. Scripts need not be coded to any standard – its the algorithm which is important – Starlink will code and document the scripts as required. The cookbook will be re-released irregularly but often as new tools come to light.