jsky.coords
Interface WorldCoordinates

All Superinterfaces:
Coordinates
All Known Implementing Classes:
WorldCoords

public interface WorldCoordinates
extends Coordinates

Interface for representing world coordinates (right-ascension, declination, stored as J2000 internally).


Method Summary
 WorldCoordinates[] box(double radius)
          Given a radius in arcmin, return an array {pos1, pos2} with the 2 endpoints that form a box with center at "this" position.
 double[] center(WorldCoordinates pos1, WorldCoordinates pos2)
          Given the endpoints of a box (pos1, pos2), return an array containing the center ra, dec in degrees, as well as the width, height, and radius of the box in arcmin.
 double[] dispos(WorldCoordinates pos)
          return the distance between this position and the given one in arcmin and also set the position angle
 java.lang.String[] format()
          Format RA and DEC in h:m:s [+-]d:m:s format in J2000 and return them as a 2 element String array.
 java.lang.String[] format(double equinox)
          Format RA and DEC in h:m:s [+-]d:m:s format in the given equinox and return them as a 2 element String array.
 DMS getDec()
          return the DEC value in J2000
 double getDecDeg()
          return the DEC value in deg J2000
 HMS getRA()
          return the RA value in J2000
 double[] getRaDec(double equinox)
          Return RA and DEC in degrees as an array of 2 doubles {ra, dec} in the given equinox.
 double getRaDeg()
          return the RA value in deg J2000
 java.lang.String toString()
          Return the coordinates as a string in h:m:s [+-]d:m:s format
 
Methods inherited from interface jsky.coords.Coordinates
dist, getCoordinateSystemName, getX, getY
 

Method Detail

getRA

HMS getRA()
return the RA value in J2000


getDec

DMS getDec()
return the DEC value in J2000


getRaDeg

double getRaDeg()
return the RA value in deg J2000


getDecDeg

double getDecDeg()
return the DEC value in deg J2000


toString

java.lang.String toString()
Return the coordinates as a string in h:m:s [+-]d:m:s format

Specified by:
toString in interface Coordinates
Overrides:
toString in class java.lang.Object

format

java.lang.String[] format(double equinox)
Format RA and DEC in h:m:s [+-]d:m:s format in the given equinox and return them as a 2 element String array.


format

java.lang.String[] format()
Format RA and DEC in h:m:s [+-]d:m:s format in J2000 and return them as a 2 element String array.


getRaDec

double[] getRaDec(double equinox)
Return RA and DEC in degrees as an array of 2 doubles {ra, dec} in the given equinox.


dispos

double[] dispos(WorldCoordinates pos)
return the distance between this position and the given one in arcmin and also set the position angle

Parameters:
pos - The other point.
Returns:
An array of 2 doubles ar[2], where ar[0] is the distance in arcmin and ar[1] is the position angle in degrees (East of North).

box

WorldCoordinates[] box(double radius)
Given a radius in arcmin, return an array {pos1, pos2} with the 2 endpoints that form a box with center at "this" position.

Parameters:
radius - The radius in arcmin.
Returns:
Array of 2 WorldCoordinates objects that are the endpoints of a box with the given radius and centered at "this" position.

center

double[] center(WorldCoordinates pos1,
                WorldCoordinates pos2)
Given the endpoints of a box (pos1, pos2), return an array containing the center ra, dec in degrees, as well as the width, height, and radius of the box in arcmin.

Parameters:
pos1 - The first endpoint of the box.
pos2 - The second endpoint of the box.
Returns:
An array of 5 doubles: {ra, dec, width, height, radius} where (ra, dec) gives the center position in deg, width and height are the size of the box in arcmin, and radius is the distance from the center to a corner in arcmin.