Package skyview.geometry.distorter
Class SIP
java.lang.Object
skyview.geometry.Transformer
skyview.geometry.Distorter
skyview.geometry.distorter.SIP
- All Implemented Interfaces:
Serializable
,Component
Implement the SIP convention for distorting a standard projection.
The SIP distortion as defined in the FITS headers takes place after the
CD matrix has been applied to the data which makes it happen later than
the other distorters. The applyBeforeScaling method is defined to return false
for this scaler. Note that although the CD matrix is applied, the
CRPIX offset is not. In principle it would be possible to adjust
the coefficients so that the distortion took place before the scaling
but we have chosen to mimic the approach used in the SIP definition.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Create the inverse distorter for the main class here. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
What does this object do?getName()
A name for this objectinverse()
Get the inverse of the transformation.boolean
isInverse
(Transformer trans) Is another transformer the inverse of this one? True only if it was created as the inverse of this transformation.static void
void
transform
(double[] in, double[] out) Calculate the distorted (actual pixel) coordinates given the standard coordinates.Methods inherited from class skyview.geometry.Distorter
getInputDimension, getOutputDimension, jacobian
Methods inherited from class skyview.geometry.Transformer
transform, transform
-
Constructor Details
-
SIP
public SIP(nom.tam.fits.Header h) Create a distorter from a FITS header. We will look for A_ORDER, B_ORDER, A_n_m and B_n_m keywords. If AP_ORDER and BP_ORDER are found and the SIPNumericInversion setting is not found, then we will also look for AP_n_m and BP_n_m for the inverse distortion. -
SIP
public SIP(double[][] distortx, double[][] distorty, double[][] undistortx, double[][] undistorty) Explicitly set the coefficients for the distorter. We infer the order from the input arrays. If the undistort's arguments are given we assume that the user wishes to use the inverse distortion. If null then we use numerical inversion of the distortion.
-
-
Method Details
-
getName
Description copied from class:Distorter
A name for this object -
getDescription
Description copied from class:Distorter
What does this object do?- Specified by:
getDescription
in interfaceComponent
- Specified by:
getDescription
in classDistorter
-
inverse
Description copied from class:Transformer
Get the inverse of the transformation. If the order matters, then the inverse is to be applied after the original transformation. This is primarily an issue with Converters. -
applyBeforeScaling
public boolean applyBeforeScaling()- Overrides:
applyBeforeScaling
in classDistorter
-
transform
public void transform(double[] in, double[] out) Calculate the distorted (actual pixel) coordinates given the standard coordinates. Note that the coefficients only give the distortion, so we need to add in the inputs. Note that primary transformations defined in SIP go the other way. Given an actual pixel location, they give the a sky position in the undistorted plane.- Specified by:
transform
in classTransformer
- Parameters:
in
- The input vector.out
- The output vector, it may be the same as the input vector if the dimensionalities are the same. All transformers are expected to work with aliased inputs and output.
-
isInverse
Is another transformer the inverse of this one? True only if it was created as the inverse of this transformation.- Specified by:
isInverse
in classTransformer
-
main
-