Previous topic

Step 2: Generate a Static Mask

Next topic

Step 4 and 8: Drizzling the Images

This Page

Step 3: Subtracting the Sky

This step measures and subtracts the sky from each input image while recording the subtracted value in the image header.

Function for computing and subtracting the backgroud of an image. The algorithm employed here uses a sigma clipped median of each sci image in a data file. Then the sky value for each detector is compared and the lowest value is subtracted from all chips in the detector. Finally, the MDRIZSKY keyword is updated in the header of the input files.

 Christopher Hanley, Megan Sosey

return useful help from a file in the script directory called, keyval), outExt=None), outExt=None, configObj=None, group=None, editpars=False, **inputDict)

Perform sky subtraction on input list of images

Parameters :

input : str or list of str

a python list of image filenames, or just a single filename

configObj : configObject

an instance of configObject

inputDict : dict, optional

an optional list of parameters specified by the user

outExt : str

The extension of the output image. If the output already exists then the input image is overwritten


These are parameters that the configObj should contain by default, they can be altered on the fly using the inputDict

Parameters that should be in configobj:

Name Definition
skyuser ‘KEYWORD in header which indicates a sky subtraction value to use’.
skysub ‘Perform sky subtraction?’
skywidth ‘Bin width for sampling sky statistics (in sigma)’
skystat ‘Sky correction statistics parameter’
skylower ‘Lower limit of usable data for sky (always in electrons)’
skyupper ‘Upper limit of usable data for sky (always in electrons)’
skyclip ‘Number of clipping iterations’
skylsigma ‘Lower side clipping factor (in sigma)’
skyusigma ‘Upper side clipping factor (in sigma)’

The output from sky subtraction is a copy of the original input file where all the science data extensions have been sky subtracted., configObj, saveFile=False, procSteps=None)