Previous topic

Step 1: Process Input

Next topic

Step 3: Subtracting the Sky

This Page

Step 2: Generate a Static Mask

This step focuses entirely on creating a static mask for each detector used in the input images of all negative (presumably bad) pixel values.

This class manages the creation of the global static mask which masks pixels which are negative in the SCI array. A static mask numpy object gets created for each global mask needed, one for each chip from each instrument/detector. Each static mask array has type Int16, and resides in memory.

Authors:
 Ivo Busko, Christopher Hanley, Warren Hack, Megan Sosey
Program:
 staticMask.py
Notes:
 Class that manages the creation of a global static mask which is used to mask pixels that are some sigma BELOW the mode computed for the image.
class drizzlepac.staticMask.staticMask(configObj=None)

This class manages the creation of the global static mask which masks pixels that are unwanted in the SCI array. A static mask object gets created for each global mask needed, one for each chip from each instrument/detector. Each static mask array has type Int16, and resides in memory.

addMember(imagePtr=None)

Combines the input image with the static mask that has the same signature.

Parameters :
 

imagePtr : object

An imageObject reference

Notes

The signature parameter consists of the tuple:

(instrument/detector, (nx,ny), chip_id)

The signature is defined in the image object for each chip

close()

Deletes all static mask objects.

deleteMask(signature)

Delete just the mask that matches the signature given.

getFilename(signature)

Returns the name of the output mask file that should reside on disk for the given signature.

getMaskArray(signature)

Returns the appropriate StaticMask array for the image.

getMaskname(chipid)

Construct an output filename for the given signature:

signature=[instr+detector,(nx,ny),detnum]

The signature is in the image object and the name of the static mask file is saved as sci_chip.outputNames[“staticMask”].

saveToFile()

Saves the static mask to a file it uses the signatures associated with each mask to contruct the filename for the output mask image.

drizzlepac.staticMask.buildSignatureKey(signature)

Build static file filename suffix used by mkstemp()

drizzlepac.staticMask.constructFilename(signature)

Construct an output filename for the given signature:

signature=[instr+detector,(nx,ny),detnum]

The signature is in the image object.

drizzlepac.staticMask.createMask(input=None, static_sig=4.0, group=None, editpars=False, configObj=None, **inputDict)

The user can input a list of images if they like to create static masks as well as optional values for static_sig and inputDict.

The configObj.cfg file will set the defaults and then override them with the user options.

drizzlepac.staticMask.createStaticMask(imageObjectList=[], configObj=None, procSteps=None)
drizzlepac.staticMask.getHelpAsString()

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

drizzlepac.staticMask.help()
drizzlepac.staticMask.run(configObj)