STIS ImageObjects¶
stisData
module provides classes used to import STIS specific instrument data.
Authors: | Megan Sosey, Christopher Hanley |
---|---|
License: | http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE |
-
class
drizzlepac.stisData.
STISInputImage
(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. doUnitConversions
()Convert the data to 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
()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.stisData.
CCDInputImage
(filename=None, group=None)[source]¶ Bases:
drizzlepac.stisData.STISInputImage
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
()Convert the data to 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. getReadNoise
()Method for returning the readnoise of a detector (in DN). getReadNoiseImage
(chip)getdarkcurrent
()Returns the dark current for the STIS CCD chip. 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. getGain -
getReadNoise
()[source]¶ Method for returning the readnoise of a detector (in DN).
Units: DN This should work on a chip, since different chips to be consistant with other detector classes where different chips have different gains.
-
-
class
drizzlepac.stisData.
NUVInputImage
(filename, group=None)[source]¶ Bases:
drizzlepac.stisData.STISInputImage
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
()Convert the data to 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
()Returns the dark current for the STIS NUV 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. getGain -
doUnitConversions
()[source]¶ Convert the data to electrons.
This converts all science data extensions and saves the results back to disk. We need to make sure the data inside the chips already in memory is altered as well.
-
-
class
drizzlepac.stisData.
FUVInputImage
(filename=None, group=None)[source]¶ Bases:
drizzlepac.stisData.STISInputImage
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
()Convert the data to 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
()Returns the dark current for the STIS FUV 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. getGain -
doUnitConversions
()[source]¶ Convert the data to electrons.
This converts all science data extensions and saves the results back to disk. We need to make sure the data inside the chips already in memory is altered as well.
-