Next: Optimizing Functions Using ASCFIT
Up: Data Analysis and Processing Techniques
Previous: DASH - Distributed Analysis System Hierarchy
Table of Contents - Subject Index - Author Index - Search - PS reprint - PDF reprint

{\v{S\/}}koda, P. 1999, in ASP Conf. Ser., Vol. 172, Astronomical Data Analysis Software and Systems VIII, eds. D. M. Mehringer, R. L. Plante, & D. A. Roberts (San Francisco: ASP), 361

The IUE High Dispersion Spectra Processing in IRAF

Petr {\v{S\/}}koda
Astronomical Institute of the Academy of Sciences of the Czech Republic, 25165 Ond{\v{r\/}}ejov, Czech Republic


The IUE high dispersion spectra available in NEWSIPS format of IUE final archive can not be directly analyzed in IRAF. A number of different packages like IUEDR (part of Starlink) or IUERDAF (written in IDL) have usually been used for this purpose. However, with the combination of the external IRAF package iuetools and several cl scripts, batch analysis of a large number of spectra can be performed. We describe the process of obtaining the data, converting it to IRAF format, echelle orders merging, and continuum fitting up to the measurements of radial velocity of selected resonance lines. We also give suggestions for rapid preparation of a convenient plot of line profile series ordered by time and orbital phase. Finally, a brief discussion of advantages and bottlenecks of IRAF approach in regards of other packages is given.

1. Introduction

The spectra obtained by IUE satellite during its long life mission are one of the important sources of information about hot stars. Any astronomer working in the field of Be and WR stars should be able to work with the data in the simple manner without detailed study of instrumental setup, image distortions, camera aging effects etc. For that purpose the best way is taking the NEWSIPS absolutely calibrated data available as MXHI (high dispersion) and MXLO (low dispersion) files of IUE Final Archive. In the following text a brief outline of the necessary reduction steps of IUE data processing is given. An extended version of this contribution (in PostScript) and the necessary cl scripts are available at

2. Obtaining data

The NEWSIPS data may be found at two places - the data processed at Goddard at the NASA server NDADS and at ESA INES server. The ESA server, however, contains only a part of all IUE spectra available, (e.g., for CX Dra there were only 7 of 102 available at NASA). The spectra in ESA archive are reprocessed using new techniques (i.e., improved extraction, echelle order splicing etc.). The data retrieval itself is done by filling in the form for jukebox server including an e-mail address. After some time, the relevant data are copied to the staging disk area and an e-mail notification is sent. Optionally, information necessary to access a private ftp server may be provided and the data from NDADS will be automatically downloaded.

3. Conversion to IRAF formats

As the most important and most complicated data files are the high dispersion spectra, we will describe only MXHI files handling and only SWP camera data. Basic options for IUE data processing are available. For data reduction in IRAF the package iuetools must be installed. It consists of two tasks: mxexpand and mxtomultispec. The mxexpand task takes the MXHI file and produces a FITS file with the binary table extension. Information for each order is stored in one row of binary table. The new FITS file may be used for data processing in STSDAS (e.g., plotting with sgplot or igi), but the majority of users will probably know much better the basic IRAF packages for CCD data analysis in multispec format ( splot, continuum, specplot). Thus the FITS file must be converted by the mxtomultispec task to the *.imh multispec file with each order in a separate aperture line. Only the absolutely calibrated fluxes are extracted. Each aperture has the dispersion polynomial fitted and written into WCS header. This file may be already analyzed in splot with each echelle order seen as different aperture/beam. A script ( is provided in order to assist in the bulk image processing.

4. Merging echelle orders

The analysis of each order separately with splot may be useful for single line investigation, however the wavelength coverage of one order is very small (about 20 Å) and the increased noise at both ends (caused by ripple correction) will degrade the useful part even more. The order splicing is thus necessary. We decided for the sake of simplicity to splice all orders in the SWP range in one long spectrum. This splicing has the affect that the data in MXHI files are linearized in wavelength but each echelle order is rebinned with different wavelength difference interval. As the IRAF world coordinate system (WCS) requires only one wavelength increment for the whole spectrum, the flux data must be re-sampled -- it may introduce some minor error in the position of sharp spectral features. We have, however, come to the conclusion that the influence of re-sampling errors on the radial velocity measurement is negligible in comparison with other effects like the uncertainty of line profile fitting due to the strong noise, aperture pointing errors etc.

For order merging we have adopted the method by Solano. He has shown that in the overlapping region of orders m and m-1 of SWP camera the S/N ratio is is higher in one third of it. Using this method we have developed the cl task which takes the multispec files *.imh, copies the selected range of wavelengths (about 0.03 Å smaller at each side to avoid the overlapping uncertainty) for each order into separate files using scopy and then merges these separate files into one long spectrum using scombine.

5. Fitting continuum and spikes removal

For some purposes (e.g., study of line profile changes) it is convenient to normalize the spectra to the common continuum level. As it is quite difficult to achieve this in some spectral regions due to the line blanketing, we have to estimate some smooth curve along the whole spliced spectra. The IRAF task continuum fits well. We have found an optimal setting with spline3 curve of order 5, high_rej=0 and low_rej=2. The continuum sample regions must be manually selected by panning through the zoomed view, however the correct continuum fitting requires adjusting the spline parameters and sampling region selection.

The removal of the bad points is complicated; fortunately the most annoying features like fiducial marks and cosmic ray hits have the shape of a sharp and deep or high spike. So we may use the continuum task again, now the order of spline must be very high (about 30) and the sigma rejection boundaries about 4 (both low and high rejection).

6. Examining interesting lines

Standard splot fitting routines like Gaussian, Lorentzian or Voigt may be used for fitting line profiles, estimating the position of the line centers etc. Some boxcar smoothing is also helpful.

7. Plotting sets of spectra

The plot of stacked spectra labeled (e.g., with the binary phase) can be achieved easily using the powerful IRAF task specplot. Using the graphics redirection operator >G the graphics metafiles *.mc containing each picture are produced. Now we can fit several pictures to one page using the gkimosaic task and print the resulting PostScript file.

8. Transformation to RV scale

The last operation may be the transformation of spectral region to the radial velocity scale with the origin at particular laboratory wavelength. The transformation will be done by the script written by Frank Valdes and taken from the adass.iraf.application newsgroup. We finally get after processing by specplot and gkimosaic the stacked plots in radial velocities (see Fig. 1).

Figure 1: Stacked plot in radial velocity scale.

9. Conclusions

There are indications, that the NEWSIPS extraction routine introduced some systematic errors into final spectra -- mainly for high dispersion SWP data, so for the precise measurements (e.g., changes in the line depth of order of several percent) the re-extraction of the spectra should be done from SIHI files. This is, however, out of scope of this article. We have shown that using the combination of IRAF scripts and its powerful tasks the customized data files and overview plots can be produced for large number of spectra easily. In comparison to the IUERDAF software, there remain some doubts about the precision of linear re-sampling and the most frustrating is the lack of a quality flags handling in present IRAF which would enable the correct removal of all problematic data marked by some quality flag. Such a task can be done in IUERDAF by patch routine. On the other side the processing using IRAF can be done quickly with the strong interactive control (e.g., specplot task) using only software available free of charge in contrast to the quite expensive IDL1 system.


This work was supported with the subvention by the Ministry of Education, Youth and Sports of the Czech Republic (grant LB98251).


... IDL1
IDL is the trademark of Research Systems, Inc.

© Copyright 1999 Astronomical Society of the Pacific, 390 Ashton Avenue, San Francisco, California 94112, USA
Next: Optimizing Functions Using ASCFIT
Up: Data Analysis and Processing Techniques
Previous: DASH - Distributed Analysis System Hierarchy
Table of Contents - Subject Index - Author Index - Search - PS reprint - PDF reprint