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.
Authors: | |
---|---|
Christopher Hanley, Megan Sosey |
return useful help from a file in the script directory called module.help
Perform sky subtraction on input list of images
Parameters : | |
---|---|
input : str or list of str
configObj : configObject
inputDict : dict, optional
outExt : str
|
Notes
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.