uk.ac.starlink.ttools.convert
Class SkySystem

java.lang.Object
  extended by 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

Constructor Summary
protected SkySystem(String name, String description, String descrip1, String descrip2, String colname1, String colname2)
          Constructor.
 
Method Summary
abstract  double[] fromFK5(double c1, double c2, double epoch)
          Converts from FK5 J2000.0 into this system.
 String[] getCoordinateColumnNames()
          Returns labels suitable for use as column names in this system.
 String[] getCoordinateDescriptions()
          Returns a full description of each coordinate in this system.
 String[] getCoordinateNames()
          Returns names of the coordinates in this system.
 String getDescription()
          Returns a short description of this system.
static SkySystem[] getKnownSystems()
          Returns an array of all the systems known.
 String getName()
          Returns the name of this system.
static SkySystem getSystemFor(String sysName)
          Returns a system which matches a given string.
static 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SkySystem

protected SkySystem(String name,
                    String description,
                    String descrip1,
                    String descrip2,
                    String colname1,
                    String colname2)
Constructor.

Parameters:
name - short system name
description - a few words of description
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 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 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

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


Copyright © 2009 Central Laboratory of the Research Councils. All Rights Reserved.