Package pydrizzle :: Module exposure :: Class Exposure
[hide private]
[frames] | no frames]

Class Exposure

source code

This class will provide the basic functionality for keeping track of an exposure's parameters, including distortion model, WCS information, and metachip shape.

Instance Methods [hide private]
 
__init__(self, expname, handle=None, dqname=None, idckey=None, new=no, wcs=None, mask=None, pa_key=None, parity=None, idcdir=None, rot=None, extver=1, exptime=None, ref_pscale=1.0, binned=1, mt_wcs=None, group_indx=None) source code
 
setCorners(self)
Initializes corners for the raw image.
source code
 
setSingleOffsets(self)
Computes the zero-point offset and shape of undistorted single chip relative to the full final output product metachip.
source code
 
getShape(self)
This method gets the shape after opening and reading the input image.
source code
 
setShape(self, size, pscale)
This method will set the shape for a new file if there is no image header information.
source code
 
buildCoeffsName(self)
Define the name of the coeffs file used for this chip.
source code
 
writeCoeffs(self)
Write out coeffs file for this chip.
source code
 
getDGEOExtn(self)
Builds filename with extension to access distortion correction image extension appropriate to each chip.
source code
 
getDGEOArrays(self)
Return numarray objects for the distortion correction image arrays.
source code
 
applyDeltaWCS(self, dcrval=None, dcrpix=None, drot=None, dscale=None)
Apply shifts to the WCS of this exposure.
source code
 
calcNewEdges(self, pscale=None)
This method will compute arrays for all the pixels around the edge of an image AFTER applying the geometry model.
source code
 
getWCS(self) source code
 
showWCS(self) source code
 
runDriz(self, pixfrac=1.0, kernel='turbo', fillval='INDEF')
Runs the 'drizzle' algorithm on this specific chip to create a numarray object of the undistorted image.
source code
Method Details [hide private]

getShape(self)

source code 

This method gets the shape after opening and reading the input image. This version will be the default way of doing this, but each instrument may override this method with one specific to their data format.

setShape(self, size, pscale)

source code 

This method will set the shape for a new file if there is no image header information.

Size will be defined as (nx,ny) and pixel size

getDGEOArrays(self)

source code 

Return numarray objects for the distortion correction image arrays.

If no DGEOFILE is specified, it will return empty 2x2 arrays.

applyDeltaWCS(self, dcrval=None, dcrpix=None, drot=None, dscale=None)

source code 

Apply shifts to the WCS of this exposure.

Shifts are always relative to the current value and in the same reference frame.

calcNewEdges(self, pscale=None)

source code 

This method will compute arrays for all the pixels around
the edge of an image AFTER applying the geometry model.

Parameter: delta - offset from nominal crpix center position

Output:   xsides - array which contains the new positions for
                  all pixels along the LEFT and RIGHT edges
          ysides - array which contains the new positions for
                  all pixels along the TOP and BOTTOM edges
The new position for each pixel is calculated by calling
self.geometry.apply() on each position.

runDriz(self, pixfrac=1.0, kernel='turbo', fillval='INDEF')

source code 

Runs the 'drizzle' algorithm on this specific chip to create a numarray object of the undistorted image.

The resulting drizzled image gets returned as a numarray object.