Class SIP

java.lang.Object
All Implemented Interfaces:
java.io.Serializable, Component

public class SIP
extends Distorter
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:
Serialized Form
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    class  SIP.SIPinverse
    Create the inverse distorter for the main class here.
  • Constructor Summary

    Constructors 
    Constructor Description
    SIP​(double[][] distortx, double[][] distorty, double[][] undistortx, double[][] undistorty)
    Explicitly set the coefficients for the distorter.
    SIP​(nom.tam.fits.Header h)
    Create a distorter from a FITS header.
  • Method Summary

    Modifier and Type Method Description
    boolean applyBeforeScaling()  
    java.lang.String getDescription()
    What does this object do?
    java.lang.String getName()
    A name for this object
    Distorter inverse()
    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 main​(java.lang.String[] args)  
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public java.lang.String getName()
      Description copied from class: Distorter
      A name for this object
      Specified by:
      getName in interface Component
      Specified by:
      getName in class Distorter
    • getDescription

      public java.lang.String getDescription()
      Description copied from class: Distorter
      What does this object do?
      Specified by:
      getDescription in interface Component
      Specified by:
      getDescription in class Distorter
    • inverse

      public Distorter 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.
      Specified by:
      inverse in class Distorter
    • applyBeforeScaling

      public boolean applyBeforeScaling()
      Overrides:
      applyBeforeScaling in class Distorter
    • 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 class Transformer
      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

      public boolean isInverse​(Transformer trans)
      Is another transformer the inverse of this one? True only if it was created as the inverse of this transformation.
      Specified by:
      isInverse in class Transformer
    • main

      public static void main​(java.lang.String[] args)