4 IRAF

 4.1 ECHIMDIVIDE
 4.2 ECHMKV
 4.3 ECHTRIM

These scripts are designed for use with data processed using the IRAF packages and scripts for handling échelle data (echelle, doecslit). They provide simple utilities which could also be used as templates for other actions.

4.1 ECHIMDIVIDE

Purpose:

Script to divide a series of extracted échelle spectra by an extracted flat-field and then rescale to the original means of the spectra.
Language:

IRAF cl script.
Description:

This script is for removing the blaze function of an extracted échelle spectrum. In this particular case an extracted flat-field spectrum is used to divide-out the blaze function. The script proceeds by dividing the échelle image by the flat field. This will lead to some change in the mean flux level in the orders of the spectrum. To remove the level shift, the mean value of each order in the input image and in the flat-field-divided image is found. A ‘correction’ ratio for each order can then be calculated and used to rescale the output image so that the resulting blaze-corrected image retains the same per-order mean level as the input. By calculating a per-order mean, rather than rescaling the image by a single factor, the order-to-order blaze corrections are retained.
Usage:

The flat parameter is the name of an extracted flat field.

The input and output lists of spectra may be the same.

To install and use:

(1)
Place script in your IRAF home$ directory as echimdivide.cl.
(2)
Interactively type:
     cl> task echimdivide=home$echimdivide.cl
(3)
Or, in your login.cl or loginuser.cl place the following before the keep:
     task echimdivide = home$echimdivide.cl
(4)
Run the task by typing:
     cl> echimdivide

You will be prompted to enter values for the parameters. Alternatively, set values using the parameter editor and then run the task.

Source code:

In a standard Starlink installation the source code for ECHIMDIVIDE can be found in the file:
     /star/examples/sc3/echimdivide.cl

4.2 ECHMKV

Purpose:

Script to extract orders from a dispersion-calibrated échelle spectrum and convert to velocity at the specified wavelength.
Language:

IRAF cl script.
Description:

The problem: One has échelle data with a series of lines, say Lyman series lines, which one wants to compare or combine in velocity space; that is the center of each line is zero velocity and the profile is in relative velocity. The following script takes a list of échelle aperture (order) numbers and central wavelengths and extracts the orders from échelle wavelength- calibrated images and modifies the header to place each order in relative velocity. The individual 1-D orders can than be stacked with SPECPLOT or combined in velocity with SCOMBINE.

This script is useful for comparing sets of lines at different wavelengths, for example, Lyman lines.

Usage:

The input parameter is the name of a multiorder échelle spectrum.

The lines parameter is a two-column text file containing the aperture number for the desired feature and the wavelength for zero velocity.

The output parameter is a root filename. A set of 1-D spectra with the root name and an appended integer will be produced, one for every line in the lines file.

To install and use:

(1)
Place script in your IRAF home$ directory as file echmkv.cl.
(2)
Interactively, load the onedspec package and type:
     on> task echmkv=home$echmkv.cl
(3)
Or, in your login.cl or loginuser.cl place the following before the ‘keep’:
     task echmkv=home$echmkv.cl
(4)
Run the task by typing:
     cl> echmkv

You will be prompted to enter values for the parameters. Alternatively, set values using the parameter editor and then run the task.

Source code:

In a standard Starlink installation the source code for ECHMKV can be found in the file:
     /star/examples/sc3/echmkv.cl
Notes:
(1)
This works in all versions of IRAF V2.10.
(2)
The script requires the ONEDSPEC package or other spectral package containing SCOPY.
(3)
Plots will have X-axes labeled as wavelength even though the value is velocity.

4.3 ECHTRIM


pdfpict


Figure 5: Two overlapping echelle orders. The upper plot shows the two individual orders after blaze correction. The correction is not perfect, and as a result the signal level falls off at the ends of the orders. The middle plot shows the merged spectrum of the orders, using their mean in the overlap. There are two discontinuities present at about 4625Å and 4661Å. The lower plot shows how these discontinuities can be removed by selecting a clip point to change from one order to the next; this is at about 4643Å. In this case, the overlap between the orders at the selected cut-off point is good and no discontinuity is present in the merged spectrum.


Purpose:

Script to trim individual échelle orders.
Language:

IRAF cl script.
Description:

When the orders of a collapsed echellogram are merged it is often the case that regions of overlap between two adjacent orders have quite different signal levels. This can be for several reasons, most notably the blaze function. When merging the orders a weighted sum of some kind is often used, however, there are almost always one or two discontinuities in the single spectrum produced. One way of ensuring that there is only one discontinuity per-order, and this is at a known position, is to trim the wavelength range of each of the orders of the echellogram so that there is precisely no overlap. Instead, the orders each cover an adjacent region of the spectrum.

This script allows the specification of sections of the orders of an echellogram to be used to produce a single spectrum. A file listing the order numbers and required sections of the orders is read and the selected regions of each order are then trimmed into the output échelle image. Several similar échelle images can be processed at the same time by specifying a list of input images.

Usage:

The input parameter is a list of IRAF échelle format images.

The orders parameter is a text file containing lines with order number and 1-D image section for trimming. See the example below for the format of the file. Basically, you should use the standard IRAF syntax for specifying a section of an image, one order per line of the file.

Each specified order is trimmed and merged into the output image.

The input and output images may be the same.

To install and use:

(1)
Place script in your IRAF home$ directory as file echtrim.cl.
(2)
Interactively, load the échelle package and type:
     ec> task echtrim=home$echtrim.cl
(3)
Or, in your login.cl or loginuser.cl place the following before the ‘keep’:
     task echtrim=home$echtrim.cl
(4)
Run the task by typing:
     cl> echtrim

You will be prompted to enter values for the parameters. Alternatively, set values using the parameter editor and then run the task.

Source code:

In a standard Starlink installation the source code for ECHTRIM can be found in the file /star/examples/sc3/echtrim.cl.

Notes:
(1)
This works with IRAF V2.10.2 through V2.10.4.
(2)
The script requires the ECHELLE package or other spectral package containing SCOPY.
Example:
    ec> imhead test.ec l-
    test.ec[512,10][real]: Artificial Echelle Spectrum
    ec> type sec.dat
    [1:100,1]
    [101:200,2]
    [201:300,3]
    [301:400,4]
    [401:500,5]
    [101:300,6]
    [101:400,7]
    ec> echtrim test.ec test1.ec sec.dat
    test.ec -> test1.ec
    test.ec[1:100,1](1)  -->  test1.ec[*,1](1)
    test.ec[101:200,2](2)  -->  test1.ec[*,2](2)
    test.ec[201:300,3](3)  -->  test1.ec[*,3](3)
    test.ec[301:400,4](4)  -->  test1.ec[*,4](4)
    test.ec[401:500,5](5)  -->  test1.ec[*,5](5)
    test.ec[101:300,6](6)  -->  test1.ec[*,6](6)
    test.ec[101:400,7](7)  -->  test1.ec[*,7](7)