Reducing frames using QuickReduce

There are in principle two ways of reducing frames, one-by-one using podi_collectcells, or by the bunch using podi_multicollect.

 

Reducing a single frame

The basic reduction using collectcells looks like the following:

podi_collectcells.py input.fits output.fits flags

input.fits is, as expected, the input file, output.fits is the filename for the output filename, and flags are optional parameters that (de-)activate certain features during the reduction. A full list of supported parameters can be found on the podi_collectcells page.

 

Reducing a bunch of frames

If you have more than just a few frames to reduce, multicollect offers a much more convenient way of doing so than podi_collectcells. A typical multicollect call looks like this:

podi_multicollect -fromfile=input.list -formatout=%OBSID.fits flags

-fromfile=XXX specifies a list of input frames. This list is a normal text-file, listing one of the OTA filenames or the directory holding the OTA fits files, with one entry per file. Only the first entry on each input line is considered the filename, so you can add comments or other information about each frame to the same file as long as they are separated by a space from the actual filename. One way of creating and pruning the input file list is using the podi_getinfo command described in the example below.

-formatout specifies a format for the output filename. The following keywords are interpreted by multicollect (and, in fact, by podi_collectcells) and replaced with the respective values from the input FITS header:

  • %OBSID:
    This is the timestamp of the input file, e.g. 20140314T123456.5. Note that the observation type identifier (the o in o2014… for object files, or the f in f2014… for flat-fields) is NOT part of this OBSID keyword.
  • %OBJECT
    Name of the object assigned by the observer (this is not necessarily the name of the target as given to the telescope operator). Note that special characters, such as spaces, (back-)slashes, etc. are replaced with underscores to prevent potential confusion with system commands.
  • %EXPTIME
    Exposure time in seconds
  • %FILTER
    Name of the filter – This might not work in the rare occurrence that the observer had more than one filter in the beam during the exposure.

flags are the very same flags that podi_collectcells understands, so check the podi_collectcells page for the entire list.

 

Creating the input filelist:

Method #1: Using the system command ls

The most basic way of creating the input filelist is using ls, for example:

ls -1 $PWD/raw/o20*/*33.fits* > input.list

It is recommended but not necessary to include the full directory name in the filename, as done by the prefix of $PWD in the above example. Note that the short-cut of ~ as a place-holder for the home-directory does NOT work here.

 

Method #2: Using podi_getinfo

While the above method certainly works, in many cases you may want to prune your input list based on target information (e.g. excluding frames labeled ‘test’ or ‘pointing check’) or only select a subset of frames based on filter, exposure time, etc. The podi_getinfo command makes this selection very easy. A basic command looks like this:

/work/podi_devel/podi_getinfo.py $PWD/raw/o*/*33.fits* >input.list

This command queries all specified files and extracts some header information for each of them. One example output (redirected into the file input.list in the above example), looks like this:

/mnt/odifile/archive/podi/NOAO-14A-0294/2014.03.27/o20140327T230642.1/o20140327T230642.1.33.fits OBJECT 1 odi_r 180.0         300163 +12:29:02.434 +01:40:35.02
/mnt/odifile/archive/podi/NOAO-14A-0294/2014.03.27/o20140327T230642.2/o20140327T230642.2.33.fits OBJECT 1 odi_r 180.0         300163 +12:29:02.648 +01:40:40.666
/mnt/odifile/archive/podi/NOAO-14A-0294/2014.03.27/o20140327T230642.3/o20140327T230642.3.33.fits OBJECT 1 odi_r 180.0         300163 +12:29:02.511 +01:40:31.328 
/mnt/odifile/archive/podi/NOAO-14A-0294/2014.03.27/o20140327T230642.4/o20140327T230642.4.33.fits OBJECT 1 odi_r 180.0         300163 +12:29:01.747 +01:40:30.150

For each frame it lists in this order:

  1. Filename
  2. Type of exposure (bias, dark, flat, object=science)
  3. Binning (either 1 or 2)
  4. Filter
  5. exposure time in seconds
  6. object name (this is what you filled in in the ODI Exposure GUI)
  7. Pointing information (Ra/Dec)

Based on this file I can delete files I don’t want (e.g. test frames, pointing checks, etc) or select only certain frames (e.g. only frames with a certain exposure time or filter).