Class SIP

  • All Implemented Interfaces:
    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
    • Constructor Detail

      • 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 Detail

      • 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
      • 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​(String[] args)