Package pydrizzle :: Module obsgeometry :: Class GeometryModel
[hide private]
[frames] | no frames]

Class GeometryModel

source code

Base class for Distortion model. There will be a separate class for each type of model/filetype used with drizzle, i.e., IDCModel and DrizzleModel.

Each class will know how to apply the distortion to a single point and how to convert coefficients to an input table suitable for the drizzle task.

Coefficients will be stored in CX,CY arrays.

Instance Methods [hide private]
 
__init__(self)
This will open the given file and determine its type and norder.
source code
 
shift(self, cx, cy, xs, ys)
Shift reference position of coefficients to new center where (xs,ys) = old-reference-position - subarray/image center.
source code
 
convert(self, tmpname, xref=None, yref=None, delta=yes)
Open up an ASCII file, output coefficients in drizzle format after converting them as necessary.
source code
 
apply(self, pixpos, scale=1.0, order=None)
Apply coefficients to a pixel position or a list of positions.
source code
 
setPScaleCoeffs(self, pscale) source code
Class Variables [hide private]
  NORDER = 3
Method Details [hide private]

shift(self, cx, cy, xs, ys)

source code 

Shift reference position of coefficients to new center where (xs,ys) = old-reference-position - subarray/image center. This will support creating coeffs files for drizzle which will be applied relative to the center of the image, rather than relative to the reference position of the chip.

convert(self, tmpname, xref=None, yref=None, delta=yes)

source code 

 Open up an ASCII file, output coefficients in drizzle
  format after converting them as necessary.
First, normalize these coefficients to what drizzle expects
Normalize the coefficients by the MODEL/output plate scale.

16-May-2002:
Revised to work with higher order polynomials by John Blakeslee.
27-June-2002:
    Added ability to shift coefficients to new center for support
        of subarrays.

apply(self, pixpos, scale=1.0, order=None)

source code 

 Apply coefficients to a pixel position or a list of positions.
  This should be the same for all coefficients tables.
Return the geometrically-adjusted position
in arcseconds from the reference position as a tuple (x,y).

Compute delta from reference position