Change page style: 

Mid-IR Imaging Reduction

This page outlines how to reduce images taken with Michelle and T-ReCS using the IRAF tasks in the midir package. Michelle imaging polarimetry reductions are also briefly described. Imaging observations can be reduced almost automatically if the observations were made in good conditions, although some interactive work is often necessary for observations taken under variable conditions.



Imaging Reductions

Imaging reductions are normally straightforward. If an observation has been taken under good conditions then the reduction of the raw data files is a one-step process. The mireduce task is used to produce final coadded, chop-subtracted and nod-subtracted data from the raw data files. The simplest reduction would be to use "mireduce filename", e.g.

mi> mireduce N20040906S0085

The resultant output file is rN20040906S0085.fits; rN20040906S0085[1] (the first image extension) contains the signal. If the default parameters for mireduce are being used, this command will cause the individual images for each nod to be stacked by simple averaging, resulting in one image of size 320 by 240 pixels containing the resultant image. For many imaging observations, this is sufficient.

The mireduce task also allows registration of the images, should this be needed. In that case, a region for registration needs to be defined (as using the whole image for registration does not work very well at all). Unfortunately the xregister task in IRAF, which is used for the registration, does not always produce the best possible registration. Some experimentation may be needed to produce a good result. PIs should run the imaging reduction with and without registration and compare the results in detail to see if the registration really has improved the image.

This example, an observation of a standard star, shows two reductions of the same image, with and without registering (miregister was used outside of mireduce to produce the registered image, but mireduce itself could simply have been run twice with different parameters). The radial profile was fit for both the unregistered and registered images. There was some improvement as seen in the FWHM values (3.69 compared to 3.83 pixels) and the ellipticity (0.24 compared to 0.18). The registration was performed using the entire image, so better results are probably achievable. Clues as to the quality of the image can be found from looking at the variance of the pixels. This is done by setting the fl_variance flag in the call to miregister or mistack. Note that mireduce should not be used to reduce imaging polarimetry files, which are handled slightly differently (see below).

It is often a good idea to examine individual images in a raw data file to check for bad nods (or individual savesets for T-ReCS) in the observation, because of detector noise, a chopping problem, clouds passing by or something else of this sort. The tasks tview, mview, and miview are all intended for this purpose. The difference between the three tasks are that tview is for raw T-ReCS files, mview is for raw Michelle files, and miview is for files produced by mprepare or tprepare where the files have been changed to a common format. Each of these tasks, which can be used by itself or called by mireduce, lets one look at individual images one by one and mark those that are bad. Please note that due to the radiative offset of the telescope if a nod A frame is removed from the set of images then a corresponding nod B frame must also be removed. Due to limitations in IRAF, all of these tasks can be slow given the number of images in a normal T-ReCS or Michelle observation.

Michelle observations that were aborted for one reason or another can be reduced using the fl_rescue flag in mireduce.


Absolute Calibration of Imaging Observations

All imaging observations are accompanied by observations of a photometric standard star that has been specified by the PI in the phase II programme and should be as close an airmass match as possible. This observation allows conversion from counts on the detector to zero magnitude flux density in the filter, assuming that the atmospheric transmission is the same for the observation of the standard and the science target.

A list of standard stars and their estimated flux density values (wavelength flux density in Jy) is given at this link. These values were calculated by integrating the assumed spectral energy distribution of the standard over the filter profiles for the different Michelle filters. It is difficult to estimate the uncertainties in these values because the atmospheric corrections are usually the largest contributor to the uncertainties in the calibration of Michelle images. The formal uncertainties in the spectral energy distributions for standard stars are generally of the order of 3% to 5%, giving a similar uncertainty in all efforts to calibrate Michelle images. Note that, although these values were derived specifically for Michelle filters, given the similarity in many Michelle and T-ReCS filters and the significant uncertainties in the standard star SEDs and atmospheric correction, they may also be of use for T-ReCS photometric calibration.

There is also an uncertainty in deriving flux density values in those cases where the spectral shape of the radiation for the science object is different from that of the standard star (which usually is the case). This colour correction may be significant for objects with very low colour temperature spectra in N-band and Q-band. This effect is smaller for narrower filters and if the filter profile is symmetric about its peak. Colour corrections are expected to be relatively small for all of the filters normally used by Michelle, but would be significant for the broad N and Q filters (which are only rarely used due to saturation problems).

Imaging Polarimetry Reductions

Polarimetry mode involves using a half-wave plate to rotate the plane of polarisation of the incoming light. The wave-plate is rotated between four positions in an "ABBA" type pattern to help to remove any linear drifts with time or sky position. For each nod position short images are obtained with wave-plate positions 0, 45, 45, 0, 22.5, 67.5, 67.5, and 22.5 degrees. Then the telescope is moved to the next nod position and the cycle is repeated. To keep the time between nods reasonably short, each waveplate position only contains a few seconds' worth of data.

Experience from the commissioning of the polarimetry mode shows that registration of the wave-plate images is essential to get an accurate result. The image of a star falls on the detector in slightly different positions for the four wave-plate angles. If these shifts are not removed, then the reduction finds a spurious polarization signal.

The registration is carried out by the reduction tasks. However it is found that the registration is sensitive to the area of the array used, and that if the entire image is used the result tends to be poor. Thus the reduction of the raw images requires three steps:

  • (a) "prepare" the raw data file with the mprepare task
  • (b) examine one of the images and select a region where there is a bright, compact object for registration
  • (c) carry out stacking of four wave-plate images with registration, using the mipstack task

Some trial and error may be needed in selecting the proper region for the registration. For a point source a 21 by 21 pixel box seems to work. For a more extended object the box needs to be larger. The output of the mipstack task is a MEF file with four extensions, these being the stacked images for wave-plate angles of 0, 22.5, 45, and 67.5 degrees. In stacking the frames one has the option of registering all frames or just those of a single wave-plate position. The former appears to work much better than the latter. If the registration is done for images at each wave-plate position, then these stacked images should again be registered when calculating the Stokes parameters. Once the four wave-plate images have been obtained, these can be converted into Stokes (I, U, Q) images using the miptrans task. Please note that miptrans simply does a pixel-by-pixel application of the relevant equations to calculate the Stokes parameters. Better results can usually be achieved by copying the extensions containing the images at the different waveplate angles to single-extension FITS files, and using a dedicated polarimetry reduction package such as the POLPACK software in the U.K. Starlink package. The only possible IRAF task to use for polarimetry analysis is the linpol task.

Another way to combine the wave-plate images is to form individual Stokes parameter images, I, U, and Q, for each AB nod pair in the observation, and then to combine these to form the final Stokes images. This is done using the mipstokes and mipsstk tasks respectively. This can be used to obtain an estimate of the signal to noise ratio for each pixel, so as to be able to screen out pixels with low S/N which produce spurious polarization signals. When this is done one can obtain estimates of the polarized and unpolarized fluxes, the percent polarization, and the position angle. Note, however, that the output polarization parameters are calculated in the simplest possible manner, and may overestimate the polarization especially when only a weak polarization signal is present. We reiterate that these routines may not produce science quality reductions. A dedicated polarization analysis package should be used for detailed analysis.

Due to the newness of the imaging polarimetry mode, further development of the package is likely to occur during the coming months.



Last update 2006 July 15; Rachel Mason, based on original pages by Kevin Volk.