Class WCS

All Implemented Interfaces:, Component

public class WCS
extends Converter
A World Coordinate System defines a translation between celestial and pixel coordinates. Note that in many cases FITS keywords describe the transformations in the other direction (from pixel to celestial) but we follow the convention that forward transformations are from celestial to pixel. Given a WCS object, wcs, the pixel-celestial coordinates trasnformation is simply wcs.inverse();
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • addScaler

      public WCS addScaler​(Scaler shift) throws TransformationException
      Return a new WCS from the existing WCS where we add a scale. This allows us to return a WCS for a subset of an image easily.
    • setPreferDSS

      public static void setPreferDSS​(boolean flag)
    • getCoordinateSystem

      public CoordinateSystem getCoordinateSystem()
      Get the CoordinateSystem used in the WCS
    • getProjection

      public Projection getProjection()
      Get the projection used in the WCS
    • getScaler

      public Scaler getScaler()
      Get the linear scaler used in the projection
    • getDistorter

      public Distorter getDistorter()
      Get the plane distorter used in the projection (or null)
    • standardWCS

      public boolean standardWCS()
    • getHeaderNaxis

      public int[] getHeaderNaxis()
    • setHeaderNaxis

      public void setHeaderNaxis​(int[] newAxes)
    • getScale

      public double getScale()
      Get the nominal scale of the WCS.
    • updateHeader

      public void updateHeader​(nom.tam.fits.Header h, Scaler s, double[] crval, java.lang.String projString, java.lang.String coordString) throws java.lang.Exception
      Write FITS WCS keywords given key values. Only relatively simple WCSs are handled here. We assume we are dealing with axes 1 and 2.
      h - The header to be updated.
      s - A Scaler giving the transformation between standard projection coordinates and pixel/device coordinates.
      projString - A three character string giving the projection used. Supported projections are: "Tan", "Sin", "Ait", "Car", "Zea".
      coordString - A string giving the coordinate system used. The first character gives the general frame. For most frames the remainder of the string gives the equinox o the coordinate system. E.g., J2000, B1950, Galactic, "E2000", "H2020.10375".
    • copyToHeader

      public void copyToHeader​(nom.tam.fits.Header h) throws nom.tam.fits.HeaderCardException
    • approximate

      public WCS approximate​(double[] pix) throws TransformationException
      Approximate a WCS (which presumably includes a Distorter) with a standard, locally correct, WCS.
      pix - The pixel location we want to approximate around.
      A more standard WCS with the distortion removed (locally).