Step 3: Subtracting the Sky — drizzlepac 1.0.6 (14-Aug-2012) documentation

### Navigation

- index
- modules |
- next |
- previous |
- drizzlepac 1.0.6 (14-Aug-2012) documentation »

# 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.

Authors:
| Christopher Hanley, Megan Sosey

`drizzlepac.sky.` `getHelpAsString`()

  return useful help from a file in the script directory called module.help

`drizzlepac.sky.` `getreferencesky`(image, keyval)

`drizzlepac.sky.` `help`()

`drizzlepac.sky.` `run`(configObj, outExt=None)

`drizzlepac.sky.` `sky`(input=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

  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.

`drizzlepac.sky.` `subtractSky`(imageObjList, configObj, saveFile=False, procSteps=None)

### Navigation

- index
- modules |
- next |
- previous |
- drizzlepac 1.0.6 (14-Aug-2012) documentation »