Package pydrizzle :: Class Pattern
[hide private]
[frames] | no frames]

Class Pattern

source code

Set default values for these to be overridden by instrument specific class variables as necessary.

Instance Methods [hide private]
 
__init__(self, filename, output=None, pars=None) source code
 
getHeaderHandle(self)
Sets up the PyFITS image handle and Primary header as self.image_handle and self.header.
source code
 
closeHandle(self)
Closes image_handle.
source code
 
addMembers(self, filename)
Build rootname for each SCI extension, and create the mask image from the DQ extension.
source code
 
applyAsnShifts(self)
Apply ASN Shifts to each member and the observations product.
source code
 
_applyShifts(self, in_wcs)
This method updates each member's WCS to reflect any offsets/corrections specified in the ASN table.
source code
 
getProductCorners(self)
Compute the product's corner positions based on input exposure's corner positions.
source code
 
buildProduct(self, filename, output)
Create Exposure object for meta-chip product after applying distortion model to input members.
source code
 
buildMetachip(self, update=yes)
Build up the new metashape based on the corrected size and position for each Exposure.
source code
 
transformMetachip(self, ref)
This method transforms this Exposure's WCS to be consistent with the provided reference WCS 'ref'.
source code
 
buildPars(self, ref=None)
This method would build a list of parameters to run 'drizzle' one a single input image.
source code
 
computeCubicCoeffs(self)
Method for converting cubic and Trauger coefficients tables into a usable form.
source code
 
computeOffsets(self, parity=None, refchip=None)
This version of 'computeOffsets' calculates the zero-point shifts to be included in the distortion coefficients table used by 'drizzle'.
source code
 
setNames(self, filename, output)
Define standard name attibutes:...
source code
 
getWCS(self) source code
 
getMember(self, memname)
Return the class instance for the member with name memname.
source code
 
getMemberNames(self)
Return the names of all members for this Class.
source code
 
getExptime(self) source code
 
DeltaXYtoOffset(self, delta)
Converts provided delta(x,y) pixel offset into a delta(RA,Dec) offset in arcseconds.
source code
Class Variables [hide private]
  IDCKEY = 'IDCTAB'
  PARITY = {'detector': DEFAULT_PARITY}
  REFDATA = {'detector': [[1., 1.], [1., 1.]]}
  NUM_IMSET = 3
  PA_KEY = 'PA_V3'
  DETECTOR_NAME = 'detector'
  COPY_SUFFIX = '.orig'
Method Details [hide private]

getHeaderHandle(self)

source code 

Sets up the PyFITS image handle and Primary header as self.image_handle and self.header.

When Pattern being used for output product, filename will be set to None and this returns None for header and image_handle.

addMembers(self, filename)

source code 

Build rootname for each SCI extension, and create the mask image from the DQ extension. It would then append a new Exposure object to 'members' list for each extension.

_applyShifts(self, in_wcs)

source code 

This method updates each member's WCS to reflect any offsets/corrections specified in the ASN table.

This method converts shifts given in output pixels into the input frame by using a reference image's WCS. This reference image must exist and have an header with a valid WCS; specifically, one which can be read using WCSObject.

buildMetachip(self, update=yes)

source code 

Build up the new metashape based on the corrected size and position for each Exposure. (Pattern method)

transformMetachip(self, ref)

source code 

This method transforms this Exposure's WCS to be consistent with the provided reference WCS 'ref'. This method only operates on the product MetaChip, with the original WCS being preserved as 'wcslin'.

Primarily, this transformation involves scaling and rotating the chip to match the reference frame values. Also, any specified size for the output frame would replace the default rotated/scaled size. All rotations would be about the center, and the reference pixel position gets shifted to accomodate this rotation.

buildPars(self, ref=None)

source code 
This method would build a list of parameters to run 'drizzle'
one a single input image.
   The reference image info 'ref' will be passed as a SkyField object.
   The default output reference frame will be passed as 'def_wcs'
   for comparison to the user's selected object 'ref'.

computeCubicCoeffs(self)

source code 

Method for converting cubic and Trauger coefficients tables into a usable form. It also replaces 'computeOffsets' for those tables as well.

computeOffsets(self, parity=None, refchip=None)

source code 

This version of 'computeOffsets' calculates the zero-point shifts to be included in the distortion coefficients table used by 'drizzle'. It REQUIRES a parity matrix to convert from V2/V3 coordinates into detector image X/Y coordinates. This matrix will be specific to each detector.

setNames(self, filename, output)

source code 

Define standard name attibutes:
        outname     - Default final output name
        outdata     - Name for drizzle science output
        outsingle   - Name for output for single image

getMemberNames(self)

source code 

Return the names of all members for this Class. Output: [{self.name:[list of member names]}]