podi_fringing Module

This module contains all functionality related to fringin in ODI frames, from creating the fringe templates, to finding the ideal fringe scaling factor to actually subtracting the fringe frame.

Standalone routines

  • -make_template

    Create a fringe template from collectcells-reduced frames

    ./podi_fringing.py -make_template (-op=nanmedian.bn) output_template.fits file1.fits file2.fits

  • -esomethod

    Determine the optimal fringe scaling and perform fringe removal

    ./podi_fringing.py -esomethod fringe_template.fits input.fits output.fits

Methods

podi_fringing.compute_fringe_scale(datahdu, fringehdu)[source]

Outdated, do not use

podi_fringing.get_fringe_scaling(data, fringe, region_file)[source]

This routine implements the technique for determining the optimal fringe scaling outlined in Snodgrass & Carry 2013, ESO Messenger 152, 14.

In short, it determines the mean value in a number of regions selected visually to represent dark- and bright spots in the fringe map. The difference between bright and dark represents the fringe amplitude. The same measurements are taken for the same regions in the data frame, informing about the fringe amplitude in the data frame. The ratio between the two amplitudes represents the required fringe scaling factor.

Parameters :
  • data (ndarray) –

    the data frame as 2-d numpy array

  • fringe (ndarray) –

    the fringe map as 2-d numpy array

  • region_file (string) –

    the filename of a ds9 region file defining the fringe vector regions

Returns:

  • A vector of measurements, column 6 of which is the scaling factor for
  • each region.

podi_fringing.make_fringing_template(input_filelist, outputfile, return_hdu=False, skymode='local')[source]

Create a fringe template from the given list of suitable input frames.

For each frame, compute the sky-level and the sky-countrate. Frames with sky-countrates exceeding a filter-specific level are ignored, as the sky is very likely contaminated by stray light. This also eliminates frames with background gradients. Each frame is then background-subtracted and normalized by its background-level, leaving only the fringe amplitude behind.

To eliminate sources, all data for a given extension are then median-combined. Once this is complete for all available extensions, the resulting fringe maps are written to the output FITS file.

podi_fringing.match_subtract_fringing(data_filename, fringe_filename, verbose=True, output=None)[source]

Outdated, do not use

podi_fringing.mpworker_fringe_scale(queue_jobs, queue_return)[source]

Outdated, do not use

Table Of Contents