Package pydrizzle :: Module pattern :: 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]
 
DeltaXYtoOffset(self, delta)
Converts provided delta(x,y) pixel offset into a delta(RA,Dec) offset in arcseconds.
source code
 
__init__(self, filename, output=None, pars=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
addMembers(self, filename)
Build rootname for each SCI extension, and create the mask image from the DQ extension.
source code
 
buildMetachip(self, update=True)
Build up the new metashape based on the corrected size and position for each Exposure.
source code
 
buildPars(self, ref=None)
This method would build a list of parameters to run 'drizzle' one a single input image.
source code
 
buildProduct(self, filename, output)
Create Exposure object for meta-chip product after applying distortion model to input members.
source code
 
closeHandle(self)
Closes image_handle.
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
 
getExptime(self) source code
 
getHeaderHandle(self)
Sets up the PyFITS image handle and Primary header as self.image_handle and self.header.
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
 
getProductCorners(self)
Compute the product's corner positions based on input exposure's corner positions.
source code
 
getShifts(self, member, wcs)
Translate the delta's in RA/Dec for each image's shift into a shift of the undistorted image.
source code
 
getWCS(self) source code
 
setBunit(self, value=None)
Set the bunit attribute for each member.
source code
 
setNames(self, filename, output)
Define standard name attibutes:...
source code
 
transformMetachip(self, ref)
This method transforms this Exposure's WCS to be consistent with the provided reference WCS 'ref'.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  COPY_SUFFIX = '.orig'
  DETECTOR_NAME = 'detector'
  IDCKEY = 'IDCTAB'
  NUM_IMSET = 3
  PARITY = {'detector': [[1.0, 0.0], [0.0, 1.0]]}
  PA_KEY = 'PA_V3'
  REFDATA = {'detector': [[1.0, 1.0], [1.0, 1.0]]}
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, filename, output=None, pars=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

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.

buildMetachip(self, update=True)

source code 

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

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.

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.

getMemberNames(self)

source code 

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

getShifts(self, member, wcs)

source code 

Translate the delta's in RA/Dec for each image's shift into a
shift of the undistorted image.

Input:
    member - Exposure class for chip
    wcs    - PyDrizzle product WCS object

Output:
    [xsh, ysh, rot, scale] -
          Returns the full set of shift information as a list

setBunit(self, value=None)

source code 

Set the bunit attribute for each member. Default value defined in Exposure class is 'ELECTRONS' If a new value is given as input, it will override the default.

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

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.