In normal usage, Recipe XML files are typically created using the GUI, but they may be edited by hand. We describe here the file format, called a “Data Reduction File (DRF)” in terminology adapted from the Keck OSIRIS pipeline.
The DRF file format is extremely similar to and descended from, but not exactly identical to, the format of Keck OSIRIS DRFs. The following explanatory text is derived and adapted from from the OSIRIS manual by Larkin et al., with modifications for GPI.
In general, an XML document is a simple ASCII file composed of markup tags. For GPI Recipe files, the most common tag is used to specify the operation of a particular primitive such as:
<primitive Name="Load Wavelength Calibration" CalibrationFile='AUTOMATIC' Skip="0"/>
In this example, the tag is enclosed in a < and /> to indicate the start and end of the tag. Alternatively, we could have used a < and a > around the tag contents, but then the complete tag would require an additional </primitive> to specify the end of the tag. This would look like:
<primitive Name="Load Wavelength Calibration" CalibrationFile='AUTOMATIC' Skip="0"> </module>
The module is the element start tag and specifies the type of tag, in this case a module (primitive) call. Then Name , CalibrationFile, and Skip specify ‘attributes’ of the tag. It is up to the pipeline to interpret these attributes. In many cases, tags can be nested, and in fact a DRF is really just one <DRF> tag with many sub-tags. Generally white space such as spaces and carriage returns are ignored.
To add a comment to an xml file surround the text in a <!– and a –> such as in this example:
<!--This is a comment -->
Each primitive can have an arbitrary list of parameters, just like keywords in IDL. However, due to the required way the XML file is parsed, all attributes must be strings enclosed in quotes. This is true even for simple integer values.
If the step needs a calibration file (i.e., Subtract Dark Frame, Extract Spectra) the attribute will look like:
If you decide to re-run a DRF and would like to skip a particular module, the easiest way is with the Skip attribute. Set it to Ô1” in order to skip the file, and set it back to Ô0” to execute the file. The default is Ô0” and is not required.
Many modules allow the output data to be piped to a GPItv window for immediate display. Just set the gpitv argument equal to the session number of the window to display in.
Others allow the user to save the results of this step (distinct from saving the final output at the end of the whole list of steps)
Other attributes are specific to each module or used by a subset of modules and are described elsewhere.
<?xml version="1.0" encoding="UTF-8"?> <DRF LogPath="/Users/mperrin/projects/GPI/pipnew/drp_code" ReductionType="Final"> <dataset InputDir="/Users/mperrin/projects/GPI/data" OutputDir="/Users/mperrin/projects/GPI/pipnew/drp_code"> <fits FileName="Ima10_H.fits" /> <fits FileName="Ima11_H.fits" /> <fits FileName="Ima12_H.fits" /> <fits FileName="Ima13_H.fits" /> <fits FileName="Ima14_H.fits" /> <fits FileName="Ima15_H.fits" /> <fits FileName="Ima16_H.fits" /> <fits FileName="Ima17_H.fits" /> <fits FileName="Ima18_H.fits" /> </dataset> <primitive name="Read Wavelength Calibration" CalibrationFile="/Users/mperrin/GPI/pipnew/drp_code/Ima2_HH-wavcal-comb.fits" /> <primitive name="Display Data with GPITV" gpitv="1" /> <primitive name="Extract Spectral Datacube" Save="0" /> <primitive name="Divide spectral data by flat" CalibrationFile="/Users/mperrin/projects/GPI/pipnew/drp_code/Ima4_Hflat.fits" Save="1" gpitv="2" /> <primitive name="Interpolate Wavelength Axis" Save="1" gpitv="2" /> <primitive name="Simple SSDI" L1Min="1.55" L1Max="1.57" L2Min="1.60" L2Max="1.65" k="1.0" Save="1" gpitv="5" /> <primitive name="Accumulate Images" Method="OnDisk" /> <primitive name="ADI based on Marois et al" numimmed="3" nfwhm="1.5" Save="0" gpitv="10" /> <primitive name="Median ADI data-cubes" Save="1" gpitv="10" /> </DRF>