cds.astro
Class Astroframe

java.lang.Object
  extended by cds.astro.Astroframe
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Ecliptic, Equatorial, Galactic, ICRS, Supergal

public abstract class Astroframe
extends java.lang.Object
implements java.io.Serializable

This abstract class defines the required methods to instanciate the definition of a frame used for astronomical coordinates.

Version:
1.1 23-Apr-2006: addition of toICRS(6-D vector), and ICRSmatrix., 1.2 06-Jun-2006: simplified version, only 2 abstract methods required: toICRSmatrix() and toICRS()
Author:
Francois Ochsenbein
See Also:
Serialized Form

Field Summary
 double base_epoch
          The defaut epoch, a constant which cannot be changed for a frame.
 byte ed_lat
          Default edition of Latitude/Declination
 byte ed_lon
          Default edition of Longitude/Right Ascention *
 double epoch
          The epoch, expressed in Julian Year.
 boolean hms
          The sexagesimal representation of the longitude may be expressed in time unit.
 double[][] ICRSmatrix
          The conversion to ICRS, if it is a simple rotation.
 java.lang.String name
          The name of the frame (normally assigned at instanciation)
 byte precision
          The defaut precision (0=unknown, 3=1', 5=1").
 
Constructor Summary
Astroframe()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Equality of frames -- name + epoch are assumed fully represent any frame.
 void fromICRS(Coo coo)
          Conversion from ICRS.
 void fromICRS(double[] u6)
          Conversion from ICRS with derivatives.
 void setFrameEpoch(double epoch)
          The setFrameEpoch method just set the default epoch.
 void setICRSmatrix()
          Make the required verifications to install the ICRS matrix.
 void toICRS(Coo coo)
          Conversion to ICRS.
 void toICRS(double[] u6)
          Conversion to ICRS with derivatives.
abstract  double[][] toICRSmatrix()
          Getting the matrix to rotate to ICRS system.
 java.lang.String toString()
          Edition of an Astroframe.
 java.lang.String toString(double epoch)
          Edition of an Astroframe with specification of the epoch.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public java.lang.String name
The name of the frame (normally assigned at instanciation)


base_epoch

public double base_epoch
The defaut epoch, a constant which cannot be changed for a frame.


epoch

public double epoch
The epoch, expressed in Julian Year. This epoch may be changed by setFrameEpoch.


ICRSmatrix

public double[][] ICRSmatrix
The conversion to ICRS, if it is a simple rotation.


precision

public byte precision
The defaut precision (0=unknown, 3=1', 5=1"). The precision value is expressed as the number of decimals (+1), i.e. 0=unknown, 1=deg 3=1' 5=1" 8=1mas 11=1ľas, etc...


ed_lon

public byte ed_lon
Default edition of Longitude/Right Ascention *


ed_lat

public byte ed_lat
Default edition of Latitude/Declination


hms

public boolean hms
The sexagesimal representation of the longitude may be expressed in time unit. This is the case of the Equatorial frames, but also in the ICRS.

Constructor Detail

Astroframe

public Astroframe()
Method Detail

toString

public java.lang.String toString()
Edition of an Astroframe. The name contains the epoch when the epoch is non-standard.

Overrides:
toString in class java.lang.Object
Returns:
the name of the Astroframe.

toString

public java.lang.String toString(double epoch)
Edition of an Astroframe with specification of the epoch.

Returns:
the name of the Astroframe.

setICRSmatrix

public final void setICRSmatrix()
Make the required verifications to install the ICRS matrix.


setFrameEpoch

public void setFrameEpoch(double epoch)
The setFrameEpoch method just set the default epoch.

Parameters:
epoch - epoch of the frame, in Julian year.

equals

public boolean equals(java.lang.Object o)
Equality of frames -- name + epoch are assumed fully represent any frame. Note that the equinox is part of the frame name, hence an equality of names imples the same equinox.

Overrides:
equals in class java.lang.Object
Parameters:
o - Another object
Returns:
True if same Astroframe

toICRSmatrix

public abstract double[][] toICRSmatrix()
Getting the matrix to rotate to ICRS system. This method should return null when the change to ICRS can't be done by a simple rotation.

Returns:
The rotation matrix from current frame to ICRS.

toICRS

public void toICRS(Coo coo)
Conversion to ICRS. This conversion must be installed only if toICRSmatrix() returns null (as in FK4). The conversion is straightforward if just a rotation is involved: coo.rotate(toICRSmatrix());

Parameters:
coo - a Coordinate assumed to express a position in my frame. On return, coo contains the corresponding coordinate in the ICRS.

fromICRS

public void fromICRS(Coo coo)
Conversion from ICRS. This conversion must be installed only if toICRSmatrix() returns null (as in FK4).

Parameters:
coo - a Coordinate assumed to express a position in ICRS. On return, coo gives the corresponding coordinate in my frame.

toICRS

public void toICRS(double[] u6)
Conversion to ICRS with derivatives. The code contained here assumes a simple rotation. It has to be overloaded if this assertion is false (see e.g. FK4)

Parameters:
u6 - a 6-vector (phase vector) of position + velocity. Velocity in Jyr-1 Note that u6 can restricted be a 3-vector.

fromICRS

public void fromICRS(double[] u6)
Conversion from ICRS with derivatives. The code contained here assumes a simple rotation. It has to be overloaded if this assertion is false (see e.g. FK4)

Parameters:
u6 - a 6-vector (phase vector) of position + velocity. Velocity in Jyr-1 Note that u6 can restricted be a 3-vector.


Copyright © 2009 UDS/CNRS