next up previous contents
Next: Reduction without Standard Star Up: Reduction using Standard Stars Previous: Background Correction

Flat Field correction

After successful completion of the command CALIBRATE/ECHELLE, the next step in the reduction is the preparation of the FLATs, i.e. the subtraction of the background level and the preparation of the file which is needed to normalise each FLAT.

The flat field correction is an optional step, it may not be needed in the case of objects exposed in the short wavelength range of the echelle (images centered at $\lambda<5000$Å). If you do not want to perform a flat field correction, set the echelle keyword FFOPT to NO and skip this section. Otherwise, type:

SET/ECHELLE FFOPT=YES FLAT=...

It is advised to replace the default names ffcorr and blaze for the output files by some readily identifiable ones via the command:

SET/ECHELLE CORRECT=... BLAZE=...

All paramters corresponding to the Background, Extraction and Rebin (sections 2, 4, 7) in the SHOW/ECHELLE must be set. See MIDAS User Manual, Vol. B, Chapter 8 (Echelle Spectra) for more details on the different background and extraction methods.

The command to reduce the FLATs is simply:

FLAT/ECHELLE [flat] [correct] [blazecorr]

If you are following the tutorial, a plot will appear after a while in order to monitor the quality of the process. You will see a vertical trace of the raw flat field on top of the fitted background. After a short while a frame will appear on the image display showing the residuals of the fit at the grid points which have been used to determine the background. As explained in Section Background definition the background is fitted to points located in the interorder space.This residual map is stored in the intermediate frame &Z

The sequence described above should be applied both to the standard stars and objects with their corresponding flatfield and wavelength calibration images. Use the command SAVE/ECHELLE name to save the relevant files containing the result of the calibrations. The next step is the computation of the instrument response. It will involve the observed standard star(s). If you do not have one available, you could still use this procedure assuming that your object is itself a standard star with flux unity. If you are following the tutorial, the table LTT1020 with absolute fluxes of this standard will be copied from the area MID_CASPEC into your work space by the command SET/ECHELLE FLUX=LTT1020. Other tables are also available or you can prepare your own table or use the table UNITY.

The following parameters have to be supplied: SLIT, OFFSET, SAMPLE and FLUXTAB, the identification of the standard star table which is to be used. To determine SLIT and OFFSET use the same procedure that was used on the FLAT to determine WIDTH1. To determine the OFFSET of the location of the orders for the object with respect to the flatfield the same column should of course be specified. SAMPLE determines the step with which the data in the final image will be sampled. When all the parameters are set, give the command:

RESPONSE/ECHELLE
This command performs the following tasks. It determines the background in the standard star and subtracts it. Then it divides by the FLAT, extracts the orders and rebins them. The counts are reduced to an exposure time of one second and the orders are binned into the same wavelength intervals as the corresponding standard star table (at present this means 12 Å intervals). The table values are divided by the observed counts to give the conversion to absolute flux units, the response. The response frame is lastly interpolated to the resolution required by the parameter SAMPLE using a low order polynomial. In order to cancel effects introduced by differences in the FLAT for the standard star and the object, the flatfield normalisation is applied. To check the accuracy of the calibration, the standard star is reduced as if it was an object. The response correction is applied to the STD and the individual orders are merged to form a one-dimensional spectrum. A description of these last steps is given in the part which describes the command REDUCE/ECHELLE. The instrument response is called RESPONSE by default, but you could assign a different name, with the command
SET/ECHELLE RESPONSE=yourname
before executing RESPONSE/ECHELLE. If you do not want to correct for the instrument response, assign the value NO to the RESPOPT parameter as
SET/ECHELLE RESPOPT=NO
and skip the RESPONSE/ECHELLE command.

REPONSE/ECHELLE does not require any user interaction. It is advised, however, to monitor the intermediate results which appear at various stages on the screen and to inspect some of the intermediate files. Two steps are particularly delicate. The first one is the fitting of the background. As already mentioned before one should not specify too high an order for the 2D-polynomial. If BIAS and DARK frames have been subtracted a mere off-set (degree 0,0) might be sufficient, of course depending on the exposure level. A careful inspection of the residuals of the background fitting as produced by BACKGROUND/ECHELLE will help in deciding the optimal choice. Small errors in the background fit will, at the edges of the orders be amplified due to the correction for the blaze. This may critically influence the results on the final, merged spectrum.

The second delicate step is the interpolation of the response frame to the required wavelength step. The sampling step of the table is 12 Å. This means about 10 calibration points per order. However discrepant pixels in the response frame which occur either at the end or beginning of an order can influence the fit. The effect is therefore again serious because the correction at the edges of the orders will be larger.

RESPONSE/ECHELLE will display on the monitor the resulting frame showing the response of the instrument at the resolution of the standard star spectrum specified by SAMPLE. Any discrepant pixels can be readily identified. To remove these, use the command

REPEAT/ECHELLE
(It is not a nice name but you are repeating some of the steps $\ldots$) This command will execute MODIFY/AREA. Identify, using the cursor, all pixels which should be excluded from the polynomial fit. When this is done, the command will execute the same set of steps as RESPONSE/ECHELLE and ultimately produce a new version of the RESPONSE file.

Even after this editing, the resulting response might still lead to unsatisfactory results. The reason is quite obvious. The sampling step of the standard star table is too large and therefore the number of reference pixels per order is too small, especially if one moves towards the blue end of the spectrum or if one has used the binned read-out mode. A possible way out of this problem is to use standard star tables sampled at about 3 Å instead of 12 Å . In the current version, standard star tables sampled at lower steps are obtained by interpolating the 12 Å tables. Note that the intrinsic resolution of the tables remains low and narrow (absorption) lines which are present in the standard star observation will not be present in the table. Test runs have shown that the response computed using a 3 Å sampling is superior to the one using the tables sampled at 12 Å . Absorption lines which are not present in the table give of course a wrong response correction but these regions can be easily edited using REPEAT/ECHELLE. Real high resolution tables will become available in future versions.

At this stage, everything is ready to reduce your observed spectrum. To reduce the object give the command INIT/ECHELLE to initialise the tables belonging to the object. Instead of specifying the wavelength step in Å one should now specify a reference file which determines the sampling of the final spectrum. This is normally the response file. Do not forget to specify also the parameter RESPONSE.

All parameters in sections Background, Extraction, Rebin, Flat-Field Correction, Response Correction, Merging as displayed by SHOW/ECHELLE must be checked.

Now type:

REDUCE/ECHELLE input output
where input and output are the input object frame and the one-dimensional output spectrum respectively. REDUCE/ECHELLE follows essentially the same steps as RESPONSE/ECHELLE. The background is determined and subtracted, the image is divided by the flatfield and the echelle orders are extracted and rebinned; the counts are normalised to an exposure time of one second. The orders are not yet corrected for the differential extinction between STD and OBJ. They are multiplied by the response and by the flatfield normalisation. As in RESPONSE/ECHELLE the determination of the background is a delicate step which needs careful monitoring.

Individual orders can be extracted using the level 1 command

MERGE/ECHELLE & name order1,order2 NOAPPEND
where & is a temporary file name (WARNING: This file will be deleted by the system when you initialise MIDAS again) created by REDUCE/ECHELLE. The parameter name is the root for the output file names to which the order number will be appended, parameters order1,order2 define the order range and NOAPPEND defines this ''method of merging`` orders. You will find all this in the tutorial. The individual orders can be plotted to check the accuracy of the method in the region where the orders overlap.

These steps, only four high level commands plus the corresponding SET/ECHELLE definitions, are the standard reduction. Depending on the type of observations, the operation can be optimised by running the commands in batch mode. Use the interactive command CALIBRATE/ECHELLE at a MIDAS work station and save the session status with the command

SAVE/ECHELLE name
where name is the session name. The rest of the reduction can be done completely in batch mode at some other time, probably at night, creating a procedure like
INIT/ECHELLE name1
SHOW/ECHELLE
FLAT/ECHELLE
RESPONSE/ECHELLE
REDUCE/ECHELLE input1 output1
REDUCE/ECHELLE ...
INIT/ECHELLE name2
...
where name1 ... are names of previously saved sessions, and input1 ..., output1 ... are the raw image and reduced spectrum, respectively. The command RESPONSE/ECHELLE can be excluded from the batch procedure given the interactive editing required.


next up previous contents
Next: Reduction without Standard Star Up: Reduction using Standard Stars Previous: Background Correction
Petra Nass
1999-06-15