Using EIS_AUTO_FIT with IRIS data

I developed an automatic Gaussian-fitting routine for the Hinode/EIS mission called EIS_AUTO_FIT and this document describes how to use it for IRIS data. A key point is that the format of IRIS level-2 files is very similar to that for EIS level-1 files so it's fairly straightforward to modify EIS routines to work for IRIS.

EIS_AUTO_FIT is described in EIS Software Note No. 16 and examples for using it are described in EIS Software Note No. 17. I've made changes to the suite of routines described in this Software Note in order to recognise IRIS data and perform different actions.

This document is under development, but the information given should be correct.

Calling eis_auto_fit for IRIS


IDL> eis_auto_fit, windata, fitdata, /perpixel [, template=template, wvl_select=wvl_select]

The /perpixel keyword is important as the units for IRIS data are DN-per-wavelength-pixel (not per-angstrom). The optional template and wvl_select structures are created with eis_fit_template and eis_wvl_select (see EIS Software Note No. 16).

Extracting line parameters

To extract the intensity, line-of-sight velocity or width from the FITDATA structure, use:

IDL> int=eis_get_fitdata(fitdata, /int)
IDL> vel=eis_get_fitdata(fitdata, /vel)
IDL> wid=eis_get_fitdata(fitdata, /wid)

You can give the /map keyword to put the images into an IDL map structure.

Reference wavelengths

When working out the velocity, the routine uses the tag FITDATA.REFWVL as the reference wavelength against which Doppler shifts are determined. This tag is set to be the average centroid of the line over the raster. One can manually set this to the reference wavelength of the line (see my line list, for example), however this assumes that the IRIS wavelength scale is accurate.

The best approach is to measure the centroid of a very cool line close to the line of interest as these lines generally have very small velocities (< 1 km/s). Examples are S I 1401.15 (near Si IV 1402.77) and O I 1355.60 (near Fe XXI 1354.08). You don't need to measure these lines at every pixel in the raster, as you simply need one measurement for an exposure. For example, you can sum all pixels along the slit and measure the cool line centroid from this one spectrum.

Suppose you measure the S I centroid, and it is +0.01 Å compared to the reference wavelength. We can then manually set the REFWVL value for Si IV 1402.77 to be:

IDL> fitdata.refwvl=1402.770 + 0.01

(1402.770 is the reference wavelength for the Si IV line) and then the velocity map obtained with EIS_GET_FITDATA will be derived using this value.

The WINDATA structure

EIS_AUTO_FIT takes as input a WINDATA structure. A key point of the windata structure is that it contains an error array for the intensities, which is needed for Gaussian fitting (see Young et al. 2015 for a description of how the errors are computed). To create an IRIS windata structure, one does:

IDL> wd=iris_getwindata(file,wvl)

where wvl is the wavelength you're interested in (e.g., 1402.7 for Si IV).

There are a set of routines for manipulating the windata structure, which are described in EIS Software Note No. 21. For example one can spatially bin data using EIS_BIN_WINDATA, or one can reduce the size of arrays using EIS_TRIM_WINDATA.

Note that the units for the intensity array are DN-per-wavelength-pixel, which is different to EIS for which they are erg cm-2 s-1 sr-1 A-1.

IRIS_GET_WINDATA can run slowly for large files - see the tips given below for how to speed up the routine.

Fit templates

The routine EIS_FIT_TEMPLATE is a GUI-based routine for creating a template for the fit. The user simply specifies the location and height of the emission line (or lines) by clicking on a spectrum. The spectrum is obtained by selecting a region in the displayed image. See EIS Software Note No. 16 for more details.

EIS_FIT_TEMPLATE automatically detects if an IRIS spectrum has been input, and it adjusts the parameters that go into the template accordingly. If you inspect the code you will see the lines:


Where width gives the initial value for the line's Gaussian width, dcen gives the range over which the centroid can vary (i.e., +/- dcen angstroms from the initial centroid), and wid_lim gives the allowed range for the Gaussian width. These values enter into template.lines, so you can manually edit this for different cases. For example, the width of O I 1355.6 will never reach 0.55, so you can set a smaller value to prevent silly fits. I set the parameters in order to handle the very broad Si IV lines that are sometimes seen.

Huge file problems

There are two types of huge file for IRIS: (1) large rasters that take the full-CCD spectra, and (2) long-duration sit-and-stare studies. Creating the windata structures for these can take minutes, and so I give tips below for speeding up this process.

Full-CCD spectra

If you are only interested in a sub-region of the spectrum, then you can do:

IDL> wd=iris_getwindata(file, 1401, wrange=[1398,1407])

which will extract only the wavelength region 1398-1407 angstroms.

Long-duration sit-and-stare

If there is a specific time period that you are interested in, then note the pixels that correspond to this period (using iris_raster_browser is a good way of doing this, as it shows the X-pixel number in the top-left corner of the GUI). If the pixels are [x0,x1], then do:

IDL> wd=iris_getwindata(file, 1401, ixrange=[x0,x1])

which will only extract this time range into the windata structure. (Note that this can also be used to select a sub-range in the X-direction for raster data.)

Page maintained by Dr P.R. Young.