Package uk.ac.starlink.ttools.convert
Class SkySystem
java.lang.Object
uk.ac.starlink.ttools.convert.SkySystem
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract double[]
fromFK5
(double c1, double c2, double epoch) Converts from FK5 J2000.0 into this system.String[]
Returns labels suitable for use as column names in this system.String[]
Returns a full description of each coordinate in this system.String[]
Returns names of the coordinates in this system.String[]
Returns a suitable UCD1+ for each coordinate in this system.Returns a short description of this system.static SkySystem[]
Returns an array of all the systems known.getName()
Returns the name of this system.static SkySystem
getSystemFor
(String sysName) Returns a system which matches a given string.static String
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.toString()
-
Field Details
-
ICRS
ICRS system. -
FK5
FK5 system. -
FK4
FK4 system. -
GALACTIC
Galactic system. -
SUPERGALACTIC
Supergalactic system. -
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 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 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
Returns the name of this system.- Returns:
- system name
-
getDescription
Returns a short description of this system.- Returns:
- system description
-
getCoordinateUcds
Returns a suitable UCD1+ for each coordinate in this system.- Returns:
- 2-element array of coordinate UCDs
-
getCoordinateDescriptions
Returns a full description of each coordinate in this system.- Returns:
- array of coordinate descriptions
-
getCoordinateNames
Returns names of the coordinates in this system.- Returns:
- array of coordinate names
-
getCoordinateColumnNames
Returns labels suitable for use as column names in this system.- Returns:
- array of column names
-
toString
-
getKnownSystems
Returns an array of all the systems known.- Returns:
- system array
-
getSystemUsage
Returns a snippet of XML which describes the systems and their meanings.- Returns:
- XML description of this class and its instances
-
getSystemFor
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
-