next up previous 80
Next: STACKGEN
Up: Starlink
Previous: MEANARC


ECHTRACT

\includegraphics[height=136mm]{sc3_04.eps}

% latex2html id marker 3054
$\textstyle \parbox{140mm}{
\caption{These are two ...
...for clarity. The lower-plotted spectrum shows
some cosmic-ray contamination.}
}$

Purpose:

Script to extract orders from a reduced échelle image to individual NDF files suitable for reading into DIPSO.

Language:

C shell script.

Description:

This script performs a common task; slicing out individual orders from a collapsed, extracted échelle image. In a collapsed échelle image each row of the 2-D image is a single order from the echellogram. Each order has its own wavelength scale, which is stored in an NDF extension. This script will pair up each order with its wavelength scale and output them as individual NDFs with flux data in the main NDF data array and wavelength data in the AXIS(1) data array, in other words, an NDF which can be read by DIPSO, FIGARO and so on.

The input image should be one output from ECHOMOP (produced using ech_result or echmenu Option 14) or FIGARO ECHARC, or one which consists of a 2-dimensional image where each order occupies a single line of the image.

There are two versions of this script available:

The scripts expect the wavelength data in the input images to be stored in NDF extensions as follows:

if this is not the case you can still use the script by modifying the value of the AXISDATA variable in the scripts.

The full all-order wavelength scales would normally be propagated to the output NDFs; to reduce the size of the individual-order NDFs this extension is deleted in each output file. You can modify this behaviour by commenting out the part of the script which `shrinks' the per-order NDFs.

The main 2-D order array is expected to be in the NDF main DATA_ARRAY (it will be for ECHOMOP or ECHARC data). If you want to take the data from a different location, then set the variable FLUXDATA in the scripts to reflect the location. For example, if the data are in the extension .MORE.ECHELLE.DATA_ARRAY, then edit the appropriate line in the script to:

   set FLUXDATA = '.MORE.ECHELLE.DATA_ARRAY';

Be sure to include the leading `.' or the extension will not be found.

Usage:

You can simply invoke this script with no arguments and you will be prompted for the required information. Alternatively, you can supply the arguments on the command line. For example, if you have a collapsed échelle spectrum extobj.sdf which contains 42 orders and you want each order to be stored in an NDF called extord_nn.sdf, where nn is the number of the order, invoke the script thus:

   % echtract extobj 1 42 extord

If supplied, command-line arguments must be in this order:

  1. Input image. Name of the image containing the échelle orders.

  2. Number of first order. Number of the first échelle order to be extracted.

  3. Number of last order. Number of the last échelle order to be extracted.

  4. Output root. Root name for output images, e.g. a value ech will lead to output files ech_01.sdf, ech_02.sdf and so on.

Missing command-line arguments are prompted for.

Source code:

Script source code available:
Notes:
  1. FIGARO V5.0-0 or higher is required.

  2. KAPPA V0.9-0 or higher is required.

  3. By default, wavelength data in the input file should be in the extension:

    • .MORE.ECHELLE.ECH_2DWAVES for ECHOMOP data.

    • .AXIS(1).MORE.FIGARO.DATA_ARRAY.DATA for ECHARC data.

    Use HDSTRACE to check this.

  4. By default, the flux array is assumed to be in the main

       .DATA_ARRAY
    

    of the input file. Use HDSTRACE to check this.

  5. This script performs a Starlink login, setup for FIGARO and KAPPA commands. This is so that the script need not be `source'd to use. You can reduce the script set up time (and get rid of the login/setup messages) if you have already done a Starlink login, setup for FIGARO and for KAPPA. Edit out the lines as indicated in the script then, to use this script, you must source it. For example:

       % source echtract extobj 1 42 extord
    



next up previous 80
Next: STACKGEN
Up: Starlink
Previous: MEANARC

Echelle Data Reduction Cookbook
Starlink Cookbook 3
Martin Clayton
10 July 2003
E-mail:ussc@star.rl.ac.uk

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