NAME

f2infomos -- Description of the tasks used to reduce FLAMINGOS-2 
             MOS data

USAGE

f2infomos

DESCRIPTION

The F2 package contains tasks for processing FLAMINGOS-2 imaging, longslit and multi-object spectroscopy (MOS) data. Many routines for the proper reduction of infrared imaging and spectroscopic data already exist within the Gemini IRAF package. Therefore, imaging, longslit and MOS reduction will also make use of the tasks in the NIRI and GNIRS packages, respectively. The specifics of the individual tasks can be found in their help files.

This document summarises the tasks used to reduce FLAMINGOS-2 MOS data. For more information regarding the FLAMINGOS-2 data structure and for generic F2 package information, see f2info. For information on the GNIRS package, see gnirsinfo. In addition, the f2examples task provides a sample processing script for MOS data.

The F2PREPARE task is used to prepare the FLAMINGOS-2 raw data from Gemini South. The output MOS data from F2PREPARE are similar to the native format for GNIRS cross-dispersed data. This allows for subsequent processing with the GNIRS package.

The tasks are designed to provide a fairly complete and flexible reduction for the purpose of assessing data quality at the time of observation. Real-time reductions may not be optimal for a particular science application. The F2 and GNIRS package scripts can be optimised for a particular application using the hidden parameters to achieve the best possible results.

The tasks produce logfiles for the performed processing steps. The name of the logfile may be set in each individual task or at the package level by setting f2.logfile.

The tasks add header keywords to the output images. These header keywords contain information about the performed processing steps and the values of the critical parameters that were used.

All FLAMINGOS-2 images are written as multi-extension FITS (MEF) files. Raw data have two unnamed extensions. Most of the header information is written to the primary header unit (PHU), which is extension [0]. The data read from the array is in the pixel data extension, which is extension [1].

It is recommended to use imtype="fits". This is set automatically when loading the GEMINI package.

TASK SUMMARY

NSHEADERS - Update header values for FLAMINGOS-2

This task is described in more detail in gnirsinfo and f2info. It must be called before beginning to reduce FLAMINGOS-2 data.

F2PREPARE - Prepare raw FLAMINGOS-2 data for reduction

This task is described in more detail in f2info. It must be called before running any of the following tasks.

F2CUT - Cut spectroscopic FLAMINGOS-2 data

F2CUT extracts the regions of interest (i.e., those regions that are expected to be illuminated) from prepared FLAMINGOS-2 data and places them into separate extensions. For longslit data, pre-defined sections are used, while for MOS data, information provided in the MDF and an edge detection algorithm are used.

F2DISPLAY - Display cut spectroscopic FLAMINGOS-2 data

F2DISPLAY can be used to display cut spectroscopic data.

NSFLAT - Produce a normalised spectral flat image

NSFLAT is used to produce a normalised spectral flat image. It is used after dark subtracting and cutting the flat images processed with F2PREPARE.

NSREDUCE - Sky subtract and flat divide spectroscopic data

NSREDUCE is used for basic reduction of raw MOS data and provides a single interface for cutting (using F2CUT for FLAMINGOS-2 data; set the fl_cut parameter to yes), flat fielding and sky subtracting. It also optionally calls nsappwave (fl_nsappwave=yes) and allows for the subtraction of dark frames.

Most GNIRS package tasks have been written so that data can be processed before or after cutting the data into regions. It is possible to run NSREDUCE more than once, so that some processing steps can be executed before cutting and others after.

For a general explanation on selecting frames for sky subtraction, please see the "SKY SELECTION" section in gnirsinfo.

NSAPPWAVE - Establish a simple wavelength solution

NSAPPWAVE provides a simple wavelength solution for spectroscopic images. The wavelength solution is based on the header information and (by default) information in the FITS look-up table gnirs$data/nsappwave.fits (use the ttools package to examine this table - ttools.tprint will display the contents - but add/delete entries or create a new table with the dedicated NSWEDIT task).

The NSAPPWAVE task is used to provide a starting point for the wavelength solution derived by NSWAVELENGTH.

NSWAVELENGTH - Establish an accurate wavelength solution

NSWAVELENGTH is used to determine the wavelength solution for calibration lamp (or sky) images starting with the initial value determined by NSAPPWAVE. This task can be run non-interactively, but often requires human intervention to get a sensible answer (see the help page for NSWAVELENGTH).

The NSWAVELENGTH task does not calibrate the data directly, but provides a database entry that can be used by NSFITCOORDS.

NSSDIST

NSSDIST is used to determine the spatial distortion (s-distortion) solution by tracing the location of the slits on the array using, for the case of FLAMINGOS-2 data, the slit image output by F2CUT.

Like NSWAVELENGTH, NSSDIST does not calibrate the data directly, but provides a database entry that can be used by NSFITCOORDS.

NSFITCOORDS - Compute 2D dispersion and distortion maps

NSFITCOORDS uses the wavelength solution found by NSWAVELENGTH and/or the spatial distortion solution found by NSSDIST to create coordinate fitting maps, which are then added to the database directory and the headers of each science extension in the output image.

NSTRANSFORM - Rectify spectra

NSTRANSFORM rectifies and interpolates the data using the wavelength solution determined by NSWAVELENGTH and/or the spatial distortion solution found by NSSDIST by applying the coordinate fitting maps calculated with NSFITCOORDS to the data.

NSEXTRACT - Extract spectra

NSEXTRACT extracts one dimensional spectra from two dimensional images, with a separate spectrum created for each input science extension. NSEXTRACT can be run either interactively or in batch mode. It is possible to specify a reference spectrum whose trace is used to define the extraction aperture for faint objects.

TYPICAL REDUCTION

For typical reductions the user will need appropriate flat images, arc (or sky) calibration images and science images. Observations of spectrophotmetric standard stars may also be required. The sample processing script for MOS data as provided by the f2examples task also shows a typical reduction.

0. Use NSHEADERS to define the header values for FLAMINGOS-2.

1. Use GEMTOOLS.GEMLIST to make separate lists of the files associated with different observation types. Typically these will be called obj.lis, arc.lis, flat.lis, etc. Tasks can then be invoked on all the data of one type using the "@" syntax.

2. Use F2PREPARE to update the raw data headers, add an MDF to the data and create the variance and data quality extensions, if desired. The other tasks will not run if the data has not first been processed using F2PREPARE.

3. Use GEMCOMBINE to create the necessary dark images.

4. Use GEMARITH to dark subtract the prepared flat images.

5. Use F2CUT to cut the dark subtracted flat images to the correct size by specifying the gradimage parameter.

6. Use NSFLAT to generate a normalised flat image from the dark subtracted, cut flat images. A BPM will also be generated.

7. Use NSREDUCE to process the arc data. First call NSREDUCE to subtract the uncut dark from the data. Then call NSREDUCE a second time to cut, flat divide (optional) and apply an approximate wavelength solution. In some cases, the quality of the fit of the wavelength solution is improved when the FLAMINGOS-2 arcs are flat divided.

8. Use NSSDIST to determine the spatial distortion solution using the slit image output by F2CUT. The MOS slits in FLAMINGOS-2 data contain curvature that varies by x position on the array, so the spatial distortion solution is important.

9. Use NSFITCOORDS to calculate coordinate fitting maps for the arc data using the spatial distortion solution from NSWAVELENGTH.

10. Use NSTRANSFORM to straighten the arc data.

11. Use NSWAVELENGTH to determine the wavelength solution using the arc data, supplying the slit image used to determine the spatial distortion solution using NSSDIST.

12. Use NSREDUCE to process the calibration and science data. First call NSREDUCE to subtract the uncut dark from the data. Then call NSREDUCE a second time to cut, flat divide, sky subtract and apply an approximate wavelength solution, if desired. The default (skyrange = INDEF) is set to 50% larger than the time between observations so that only immediately neighbouring frames are used for sky.

13. Either group by spatial offset and combine science observations using NSSTACK, or combine all science observations with shifting as required using NSCOMBINE.

14. Use NSFITCOORDS to calculate coordinate fitting maps for the combined science data using the wavelength solution from NSWAVELENGTH and the spatial distortion solution from NSSDIST.

15. Use NSTRANSFORM to resample the combined science data to a uniform wavelength and spatial scale.

16. Use NSEXTRACT to extract 1D spectra from the rectified data, if desired.

17. After the 2D data are reduced (before or after NSEXTRACT), a telluric correction and possibly a flux calibration may be applied. For the telluric correction, NSTELLURIC can be used. For flux calibration, NSCALIBRATE is not yet available in the latest version of the Gemini IRAF package. The CALIBRATE IRAF task can be used directly on the science extension.

REDUCTION EXAMPLES

The f2examples task provides a sample processing script for MOS data.

BUGS AND LIMITATIONS

The tasks in the F2 and GNIRS packages are designed to operate on MEF images that have been processed using F2PREPARE. The task F2PREPARE will not run on data from instruments other than FLAMINGOS-2 and will not run on simple FITS files.

SEE ALSO

f2prepare, f2cut, f2examples, f2info, gnirs.gnirsinfo, gnirs.nsheaders, gnirs.nscut, gnirs.nsflat, gnirs.nsreduce, gnirs.nsappwave, gnirs.nsstack, gnirs.nscombine, gnirs.nssdist, gnirs.nswavelength, gnirs.nsfitcoords, gnirs.nstransform, gnirs.nsextract