Package uk.ac.starlink.ttools.convert
Class SkySystem
- java.lang.Object
-
- uk.ac.starlink.ttools.convert.SkySystem
-
public abstract class SkySystem extends java.lang.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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SkySystem(java.lang.String name, java.lang.String description, java.lang.String ucd1, java.lang.String ucd2, java.lang.String descrip1, java.lang.String descrip2, java.lang.String colname1, java.lang.String colname2)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract double[]
fromFK5(double c1, double c2, double epoch)
Converts from FK5 J2000.0 into this system.java.lang.String[]
getCoordinateColumnNames()
Returns labels suitable for use as column names in this system.java.lang.String[]
getCoordinateDescriptions()
Returns a full description of each coordinate in this system.java.lang.String[]
getCoordinateNames()
Returns names of the coordinates in this system.java.lang.String[]
getCoordinateUcds()
Returns a suitable UCD1+ for each coordinate in this system.java.lang.String
getDescription()
Returns a short description of this system.static SkySystem[]
getKnownSystems()
Returns an array of all the systems known.java.lang.String
getName()
Returns the name of this system.static SkySystem
getSystemFor(java.lang.String sysName)
Returns a system which matches a given string.static java.lang.String
getSystemUsage()
Returns a snippet of XML which describes the systems and their meanings.abstract double[]
toFK5(double c1, double c2, double epoch)
Converts to FK5 J2000.0 from this system.java.lang.String
toString()
-
-
-
Field Detail
-
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 Detail
-
SkySystem
protected SkySystem(java.lang.String name, java.lang.String description, java.lang.String ucd1, java.lang.String ucd2, java.lang.String descrip1, java.lang.String descrip2, java.lang.String colname1, java.lang.String colname2)
Constructor.- Parameters:
name
- short system namedescription
- a few words of descriptionucd1
- UCD1+ for first coordinateucd2
- UCD1+ for second coordinatedescrip1
- short description of first coordinatedescrip2
- short description of second coordinatecolname1
- label for first coordinate suitable for use as column namecolname2
- label for second coordinate suitable for use as column name
-
-
Method Detail
-
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 java.lang.String getName()
Returns the name of this system.- Returns:
- system name
-
getDescription
public java.lang.String getDescription()
Returns a short description of this system.- Returns:
- system description
-
getCoordinateUcds
public java.lang.String[] getCoordinateUcds()
Returns a suitable UCD1+ for each coordinate in this system.- Returns:
- 2-element array of coordinate UCDs
-
getCoordinateDescriptions
public java.lang.String[] getCoordinateDescriptions()
Returns a full description of each coordinate in this system.- Returns:
- array of coordinate descriptions
-
getCoordinateNames
public java.lang.String[] getCoordinateNames()
Returns names of the coordinates in this system.- Returns:
- array of coordinate names
-
getCoordinateColumnNames
public java.lang.String[] getCoordinateColumnNames()
Returns labels suitable for use as column names in this system.- Returns:
- array of column names
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getKnownSystems
public static SkySystem[] getKnownSystems()
Returns an array of all the systems known.- Returns:
- system array
-
getSystemUsage
public static java.lang.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(java.lang.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:
java.lang.IllegalArgumentException
- if sysName isn't a system name
-
-