Code and Data Requirements

The Code

The main program in XDGNIRS, XDpiped.csh, is a “wrapper” script that calls various other Python and shell scripts. The Python scripts, in turn, call various PyRAF tasks in the Gemini GNIRS data reduction package. XDGNIRS has been tested with the latest version of the Gemini IRAF Virtual Machine, which contains the Gemini IRAF 1.15 and PyRAF 2.2.1 packages running on Python 3. For further details on Gemini-specific software, please visit their data processing software page, as well as the US NGO’s data analysis summary page.

The parameters of the Gemini IRAF tasks have been selected to work well on “normal” XD data sets generally, but if necessary, they could be changed by directly editing the calls to the tasks in the \*py scripts. This manual describes how to run XDGNIRS; for help with the individual IRAF tasks, please see the GNIRS XD DR page and IRAF’s command-line help. The XDGNIRS code and example data can be obtained from GitLab, as detailed in Installation and setup.

Assuming python/Gemini IRAF/PyRAF is available, installing the pipeline involves cloning or downloading the repository and adding a couple of lines to the .bashrc or .cshrc files (see instructions on Installation and setup). The latest version of the “cleanir” python script is also included with XDGNIRS, and it can also be found on GitHub.

Data Requirements

XDGNIRS needs the following data and will most likely crash if any of these files are missing or do not comply with the listed criteria:

  • Science target acquisition images

    • Target name in headers (OBJECT keyword) must be identical to target name in spectroscopy file headers

    • Means that blind offset observations cannot be reduced without first editing the headers

    • Only the final acq. image in the sequence is strictly necessary (the acq. images are only needed because of the telescope position information in the file headers)

  • Science target spectroscopy files

    • At least two object-sky pairs

    • ABBA, ABA, or (probably) ABAB nod pattern

    • ABB\(^\prime\)A\(^\prime\) or other patterns with \(>\)2 positions will not be handled properly

    • Nod along slit or off to the blank sky

    • Must contain a “q” offset (as well as or instead of “p” offset)

  • Standard star acquisition images

    • Same criteria as for science target acquisition images

  • Standard star spectroscopy files

    • One standard star observation only

    • Same criteria as for science target spectroscopy

  • One or more arcs

  • A set of IR and QH flats

  • One or more pinhole flats

All of these are acquired as standard for GNIRS XD queue observations. Note that the code can currently only deal with one standard star and one science target data set at a time. If there is an observation of a single target split over \(>\)1 epoch (including re-acquisitions on the same night), each segment will need to be reduced separately. If the observation program has two standard stars, use only one or repeat the reduction with both standards to identify which works better. Combining standards is not supported.

Sometimes the observer will have adjusted the exposure time of the standard star to avoid saturation or increase the signal. In this case, only the files with the appropriate exposure time should be given to XDGNIRS (although the code will attempt to flag deviant exposure times and exit if any are found).