WFC3 ImageObjects

wfc3Data module provides classes used to import WFC3 specific instrument data.

Authors:Megan Sosey, Christopher Hanley
License:http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE
class drizzlepac.wfc3Data.WFC3InputImage(filename=None, group=None)[source]

Bases: drizzlepac.imageObject.imageObject

Methods

buildERRmask(chip, dqarr, scale) Builds a weight mask from an input DQ array and an ERR array associated with the input image.
buildEXPmask(chip, dqarr) Builds a weight mask from an input DQ array and the exposure time per pixel for this chip.
buildIVMmask(chip, dqarr, scale) Builds a weight mask from an input DQ array and either an IVM array provided by the user or a self-generated IVM array derived from the flat-field reference file associated with the input image.
buildMask(chip[, bits, write]) Build masks as specified in the user parameters found in the configObj object.
clean() Deletes intermediate products generated for this imageObject.
close() Close the object nicely and release all the data arrays from memory YOU CANT GET IT BACK, the pointers and data are gone so use the getData method to get the data array returned for future use.
compute_wcslin([undistort]) Compute the undistorted WCS based solely on the known distortion model information associated with the WCS.
findExtNum([extname, extver]) Find the extension number of the give extname and extver.
find_DQ_extension() Return the suffix for the data quality extension and the name of the file which that DQ extension should be read from.
getAllData([extname, exclude]) This function is meant to make it easier to attach ALL the data extensions of the image object so that we can write out copies of the original image nicer.
getData([exten]) Return just the data array from the specified extension fileutil is used instead of fits to account for non- FITS input images.
getExtensions([extname, section]) Return the list of EXTVER values for extensions with name specified in extname.
getHeader([exten]) Return just the specified header extension fileutil is used instead of fits to account for non-FITS input images.
getInstrParameter(value, header, keyword) This method gets a instrument parameter from a pair of task parameters: a value, and a header keyword.
getKeywordList(kw) Return lists of all attribute values for all active chips in the imageObject.
getNumpyType(irafType) Return the corresponding numpy data type.
getOutputName(name) Return the name of the file or PyFITS object associated with that name, depending on the setting of self.inmemory.
getReadNoiseImage(chip)
getdarkcurrent()
getdarkimg(chip)
getexptimeimg(chip)
Returns:
getflat(chip) Method for retrieving a detector’s flat field.
getskyimg(chip)
info() Return fits information on the _image.
putData([data, exten]) Now that we are removing the data from the object to save memory, we need something that cleanly puts the data array back into the object so that we can write out everything together using something like fits.writeto….this method is an attempt to make sure that when you add an array back to the .data section of the hdu it still matches the header information for that section ( ie.
returnAllChips([extname, exclude]) Returns a list containing all the chips which match the extname given minus those specified for exclusion (if any).
saveVirtualOutputs(outdict) Assign in-memory versions of generated products for this imageObject based on dictionary ‘outdict’.
setInstrumentParameters(instrpars) Define instrument-specific parameters for use in the code.
set_mt_wcs(image) Reset the WCS for this image based on the WCS information from another imageObject.
set_units(chip) Define units for this image.
set_wtscl(chip, wtscl_par) Sets the value of the wt_scl parameter as needed for drizzling.
updateContextImage(contextpar) Reset the name of the context image to None if parameter context == False.
updateData(exten, data) Write out updated data and header to the original input file for this object.
updateIVMName(ivmname) Update outputNames for image with user-supplied IVM filename.
updateOutputValues(output_wcs) Copy info from output WCSObject into outputnames for each chip for use in creating outputimage object.
getGain  
SEPARATOR = '_'
class drizzlepac.wfc3Data.WFC3UVISInputImage(filename=None, group=None)[source]

Bases: drizzlepac.wfc3Data.WFC3InputImage

Methods

buildERRmask(chip, dqarr, scale) Builds a weight mask from an input DQ array and an ERR array associated with the input image.
buildEXPmask(chip, dqarr) Builds a weight mask from an input DQ array and the exposure time per pixel for this chip.
buildIVMmask(chip, dqarr, scale) Builds a weight mask from an input DQ array and either an IVM array provided by the user or a self-generated IVM array derived from the flat-field reference file associated with the input image.
buildMask(chip[, bits, write]) Build masks as specified in the user parameters found in the configObj object.
clean() Deletes intermediate products generated for this imageObject.
close() Close the object nicely and release all the data arrays from memory YOU CANT GET IT BACK, the pointers and data are gone so use the getData method to get the data array returned for future use.
compute_wcslin([undistort]) Compute the undistorted WCS based solely on the known distortion model information associated with the WCS.
findExtNum([extname, extver]) Find the extension number of the give extname and extver.
find_DQ_extension() Return the suffix for the data quality extension and the name of the file which that DQ extension should be read from.
getAllData([extname, exclude]) This function is meant to make it easier to attach ALL the data extensions of the image object so that we can write out copies of the original image nicer.
getData([exten]) Return just the data array from the specified extension fileutil is used instead of fits to account for non- FITS input images.
getExtensions([extname, section]) Return the list of EXTVER values for extensions with name specified in extname.
getHeader([exten]) Return just the specified header extension fileutil is used instead of fits to account for non-FITS input images.
getInstrParameter(value, header, keyword) This method gets a instrument parameter from a pair of task parameters: a value, and a header keyword.
getKeywordList(kw) Return lists of all attribute values for all active chips in the imageObject.
getNumpyType(irafType) Return the corresponding numpy data type.
getOutputName(name) Return the name of the file or PyFITS object associated with that name, depending on the setting of self.inmemory.
getReadNoiseImage(chip)
getdarkcurrent(chip) Return the dark current for the WFC3 UVIS detector.
getdarkimg(chip)
getexptimeimg(chip)
Returns:
getflat(chip) Method for retrieving a detector’s flat field.
getskyimg(chip)
info() Return fits information on the _image.
putData([data, exten]) Now that we are removing the data from the object to save memory, we need something that cleanly puts the data array back into the object so that we can write out everything together using something like fits.writeto….this method is an attempt to make sure that when you add an array back to the .data section of the hdu it still matches the header information for that section ( ie.
returnAllChips([extname, exclude]) Returns a list containing all the chips which match the extname given minus those specified for exclusion (if any).
saveVirtualOutputs(outdict) Assign in-memory versions of generated products for this imageObject based on dictionary ‘outdict’.
setInstrumentParameters(instrpars) This method overrides the superclass to set default values into the parameter dictionary, in case empty entries are provided.
set_mt_wcs(image) Reset the WCS for this image based on the WCS information from another imageObject.
set_units(chip) Define units for this image.
set_wtscl(chip, wtscl_par) Sets the value of the wt_scl parameter as needed for drizzling.
updateContextImage(contextpar) Reset the name of the context image to None if parameter context == False.
updateData(exten, data) Write out updated data and header to the original input file for this object.
updateIVMName(ivmname) Update outputNames for image with user-supplied IVM filename.
updateOutputValues(output_wcs) Copy info from output WCSObject into outputnames for each chip for use in creating outputimage object.
doUnitConversions  
getGain  
doUnitConversions()[source]
getdarkcurrent(chip)[source]

Return the dark current for the WFC3 UVIS detector. This value will be contained within an instrument specific keyword.

Returns:
darkcurrent: float

The dark current value with units of electrons.

setInstrumentParameters(instrpars)[source]

This method overrides the superclass to set default values into the parameter dictionary, in case empty entries are provided.

class drizzlepac.wfc3Data.WFC3IRInputImage(filename=None, group=None)[source]

Bases: drizzlepac.wfc3Data.WFC3InputImage

Methods

buildERRmask(chip, dqarr, scale) Builds a weight mask from an input DQ array and an ERR array associated with the input image.
buildEXPmask(chip, dqarr) Builds a weight mask from an input DQ array and the exposure time per pixel for this chip.
buildIVMmask(chip, dqarr, scale) Builds a weight mask from an input DQ array and either an IVM array provided by the user or a self-generated IVM array derived from the flat-field reference file associated with the input image.
buildMask(chip[, bits, write]) Build masks as specified in the user parameters found in the configObj object.
clean() Deletes intermediate products generated for this imageObject.
close() Close the object nicely and release all the data arrays from memory YOU CANT GET IT BACK, the pointers and data are gone so use the getData method to get the data array returned for future use.
compute_wcslin([undistort]) Compute the undistorted WCS based solely on the known distortion model information associated with the WCS.
doUnitConversions() WF3 IR data come out in electrons, and I imagine the photometry keywords will be calculated as such, so no image manipulation needs be done between native and electrons
findExtNum([extname, extver]) Find the extension number of the give extname and extver.
find_DQ_extension() Return the suffix for the data quality extension and the name of the file which that DQ extension should be read from.
getAllData([extname, exclude]) This function is meant to make it easier to attach ALL the data extensions of the image object so that we can write out copies of the original image nicer.
getData([exten]) Return just the data array from the specified extension fileutil is used instead of fits to account for non- FITS input images.
getExtensions([extname, section]) Return the list of EXTVER values for extensions with name specified in extname.
getHeader([exten]) Return just the specified header extension fileutil is used instead of fits to account for non-FITS input images.
getInstrParameter(value, header, keyword) This method gets a instrument parameter from a pair of task parameters: a value, and a header keyword.
getKeywordList(kw) Return lists of all attribute values for all active chips in the imageObject.
getNumpyType(irafType) Return the corresponding numpy data type.
getOutputName(name) Return the name of the file or PyFITS object associated with that name, depending on the setting of self.inmemory.
getReadNoiseImage(chip)
getdarkcurrent() Return the dark current for the WFC3/IR detector.
getdarkimg(chip) Return an array representing the dark image for the detector.
getexptimeimg(chip) Return an array representing the exposure time per pixel for the detector.
getflat(chip) Method for retrieving a detector’s flat field.
getskyimg(chip)
info() Return fits information on the _image.
putData([data, exten]) Now that we are removing the data from the object to save memory, we need something that cleanly puts the data array back into the object so that we can write out everything together using something like fits.writeto….this method is an attempt to make sure that when you add an array back to the .data section of the hdu it still matches the header information for that section ( ie.
returnAllChips([extname, exclude]) Returns a list containing all the chips which match the extname given minus those specified for exclusion (if any).
saveVirtualOutputs(outdict) Assign in-memory versions of generated products for this imageObject based on dictionary ‘outdict’.
setInstrumentParameters(instrpars) This method overrides the superclass to set default values into the parameter dictionary, in case empty entries are provided.
set_mt_wcs(image) Reset the WCS for this image based on the WCS information from another imageObject.
set_units(chip) Define units for this image.
set_wtscl(chip, wtscl_par) Sets the value of the wt_scl parameter as needed for drizzling.
updateContextImage(contextpar) Reset the name of the context image to None if parameter context == False.
updateData(exten, data) Write out updated data and header to the original input file for this object.
updateIVMName(ivmname) Update outputNames for image with user-supplied IVM filename.
updateOutputValues(output_wcs) Copy info from output WCSObject into outputnames for each chip for use in creating outputimage object.
getGain  
doUnitConversions()[source]

WF3 IR data come out in electrons, and I imagine the photometry keywords will be calculated as such, so no image manipulation needs be done between native and electrons

getdarkcurrent()[source]

Return the dark current for the WFC3/IR detector. This value will be contained within an instrument specific keyword.

Returns:
darkcurrent: float

The dark current value in units of electrons.

getdarkimg(chip)[source]

Return an array representing the dark image for the detector.

Returns:
dark: array

Dark image array in the same shape as the input image with units of cps

getexptimeimg(chip)[source]

Return an array representing the exposure time per pixel for the detector.

Returns:
dark: array

Exposure time array in the same shape as the input image

getskyimg(chip)[source]

Notes

Return an array representing the sky image for the detector. The value of the sky is what would actually be subtracted from the exposure by the skysub step.

Units:electrons
setInstrumentParameters(instrpars)[source]

This method overrides the superclass to set default values into the parameter dictionary, in case empty entries are provided.