This is an old revision of the document!


pywifes.subtract_overscan

Purpose: to subtract overscan from raw WiFeS data.

Parameters

def subtract_overscan(inimg, outimg,
                      data_hdu = 0,
                      detector_regions=None,
                      overscan_regions=None,
                      gain=None,
                      rdnoise=None):
  • inimg - Input raw WiFeS image, including detector pixels plus overscan pixels.
  • outimg - Overscan-subtracted data including only 4k x 4k (or appropriate binned size) detector pixels.
  • data_hdu - FITS extension in which image data is stored. Default value should be 0, but some data have been stored in data_hdu=1 for unknown reasons.
  • detector_regions - Regions of the image data which corresponds to the actual detector. This is a list of length N of lists of length 4, where N is the number of amplifiers reading out the data and each amp is defined by a length 4 list of [xmin, xmax, ymin, ymax] in unbinned pixel values. Note these are not indexed in Python syntax, but instead are similar to the DETSEC header keyword syntax. If 'None' default values for given detector epoch are used.
  • overscan_regions - Same as detector_regions but defining overscan regions for each amplifier. If 'None' default values for given detector epoch are used.
  • gain - List of gain values of length N, where N is the number of amplifiers. If 'None' default values for given detector epoch are used.
  • rdnoise - List of readout noise values of length N, where N is the number of amplifiers. If 'None' default values for given detector epoch are used.

Returns

  • (nothing)

Detailed Description

This function subtracts overscan values from raw WiFeS frames (inimg) and saves output overscan-subtracted data in a new image (outimg). For each amplifier, the overscan value is determined as the median value of pixels in the defined overscan region (overscan_regions), then subtracted from all pixels values from the detector region for that amplifier (detector_regions). Users may input new values for the detector and overscan regions, as well as the gain (gain) and readout noise (rdnoise) values, but the default values should be determined automatically by calculating the detector epoch.

Calling Requirements

Input should be raw WiFeS data.

Known Limitations

None