Class SkySystem

java.lang.Object
uk.ac.starlink.ttools.convert.SkySystem

public abstract class SkySystem extends Object
Represents a sky coordinate system.

Conversions all go via FK5 J2000.0, I think. SLALIB (Pal) is used to do the work. In some cases an epoch is considered. No opportunity is given for using an equinox value. I am not an expert on sky coordinate systems, and I think there may be subtleties which I'm not addressing accurately here.

Since:
30 Aug 2005
Author:
Mark Taylor
  • Field Details

    • ICRS

      public static final SkySystem ICRS
      ICRS system.
    • FK5

      public static final SkySystem FK5
      FK5 system.
    • FK4

      public static final SkySystem FK4
      FK4 system.
    • GALACTIC

      public static final SkySystem GALACTIC
      Galactic system.
    • SUPERGALACTIC

      public static final SkySystem SUPERGALACTIC
      Supergalactic system.
    • ECLIPTIC

      public static final SkySystem ECLIPTIC
      Ecliptic sysem.
  • Constructor Details

    • SkySystem

      protected SkySystem(String name, String description, String ucd1, String ucd2, String descrip1, String descrip2, String colname1, String colname2)
      Constructor.
      Parameters:
      name - short system name
      description - a few words of description
      ucd1 - UCD1+ for first coordinate
      ucd2 - UCD1+ for second coordinate
      descrip1 - short description of first coordinate
      descrip2 - short description of second coordinate
      colname1 - label for first coordinate suitable for use as column name
      colname2 - label for second coordinate suitable for use as column name
  • Method Details

    • fromFK5

      public abstract double[] fromFK5(double c1, double c2, double epoch)
      Converts from FK5 J2000.0 into this system.
      Parameters:
      c1 - right ascension in FK5 (radians)
      c2 - declination in FK5 (radians)
      Returns:
      2-element array of coordinates in this system (radians)
    • toFK5

      public abstract double[] toFK5(double c1, double c2, double epoch)
      Converts to FK5 J2000.0 from this system.
      Parameters:
      c1 - first coordinate in this system (radians)
      c2 - second coordinate in this system (radians)
      Returns:
      2-element array containing (RA, Dec) in FK5 (radians)
    • getName

      public String getName()
      Returns the name of this system.
      Returns:
      system name
    • getDescription

      public String getDescription()
      Returns a short description of this system.
      Returns:
      system description
    • getCoordinateUcds

      public String[] getCoordinateUcds()
      Returns a suitable UCD1+ for each coordinate in this system.
      Returns:
      2-element array of coordinate UCDs
    • getCoordinateDescriptions

      public String[] getCoordinateDescriptions()
      Returns a full description of each coordinate in this system.
      Returns:
      array of coordinate descriptions
    • getCoordinateNames

      public String[] getCoordinateNames()
      Returns names of the coordinates in this system.
      Returns:
      array of coordinate names
    • getCoordinateColumnNames

      public String[] getCoordinateColumnNames()
      Returns labels suitable for use as column names in this system.
      Returns:
      array of column names
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getKnownSystems

      public static SkySystem[] getKnownSystems()
      Returns an array of all the systems known.
      Returns:
      system array
    • getSystemUsage

      public static String getSystemUsage()
      Returns a snippet of XML which describes the systems and their meanings.
      Returns:
      XML description of this class and its instances
    • getSystemFor

      public static SkySystem getSystemFor(String sysName)
      Returns a system which matches a given string. Abbreviations may be used.
      Parameters:
      sysName - name to match
      Returns:
      a SkySystem, not null
      Throws:
      IllegalArgumentException - if sysName isn't a system name