Tutorial: Generate fringe templates

Creating fringe-frames is, in principle, very similar to just reducing a data frame:

  1. Create your calibration frames
  2. Reduce a number of frames for the filter you want to generate the fringe-template for. Make sure that all frames are exposed long enough to have accumulated enough background counts. Also it is critical that all frames have been observed under dark (i.e. no moon at all, grey time won’t work) conditions, as scattered light does not produce fringes and thus dilutes the fringe template.

Once that’s done, all remaining functionality is encapsulated in the podi_fringing module. The routine you want to use is the make_template command line switch:

/work/podi_devel/podi_fringing.py -make_template output.fits */sci/*.?___odi_i___300.0.fits

For each input frame, this routine determines the background level, subtracts this background-level and then normalizes the frame with this background-level. Doing so brings all frames to roughly the same scaling that is identical to the amplitude of the fringe effect. All data for each OTA in all frames are then combined to form the fringe template.

There are ways of modifying the behavior a little and optimize the output, mostly via an additional  -op=X command line flag. With this flag you can change the way all the frames are combined. In practice, only the only the following two methods are likely to give good results:

  • -op=nanmedian.bn – take a simple median of all frames
  • -op=sigmaclipmean – iteratively clip 30sigma outliers and then compute the mean of all remaining values

You can furthermore select “auto” as output filename instead of the output.fits in the example above. In this case, the output filename will be generated based on the filter of the input frames, making the output filename instantly compatible with the filename requirements of podi_collectcells.

 

As an example, the current odi_i band template was generated with the following command:

/work/podi_devel/podi_fringing.py -make_template auto */sci/*.?___odi_i___300.0.fits -op=sigmaclipmean