uk.ac.starlink.ttools.cone
Class SkyBox

java.lang.Object
  extended by uk.ac.starlink.ttools.cone.SkyBox

public class SkyBox
extends Object

Defines a region of the celestial sphere which is rectangular in Right Ascension and Declination coordinates.

This class just aggregates a two-element double[] array (x1,x2) for each of right ascension and declination. The meaning in each case is as follows:

The degenerate case x1==x2 can be viewed as either.

Values should be in the range 0<=ra<2*PI and -PI/2<dec<+PI (or equivalent in degrees if degrees are being used).

The static getConeBox(double, double, double) method is provided to generate a SkyBox suitable for cone search queries.

Since:
9 Jan 2008
Author:
Mark Taylor

Method Summary
static double calculateDeltaRa(double dec, double sr)
          Works out the minimum change in Right Ascension which will encompass all points within a given search radius at a given central declination.
static SkyBox getConeBox(double ra, double dec, double sr)
          Returns a minimal SkyBox which encloses a given cone using radians.
 double[] getDecRange()
          Returns declination range.
 double[] getRaRange()
          Returns right ascension range.
 SkyBox toDegrees()
          Converts the units of this SkyBox from radians to degrees.
 SkyBox toRadians()
          Converts the units of this SkyBox from degrees to radians.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRaRange

public double[] getRaRange()
Returns right ascension range. See class documentation for range semantics.

Returns:
(ra1,ra2) array or null

getDecRange

public double[] getDecRange()
Returns declination range. See class documentation for range semantics.

Returns:
(dec1,dec2) array or null

toDegrees

public SkyBox toDegrees()
Converts the units of this SkyBox from radians to degrees.

Returns:
new sky box with converted range values

toRadians

public SkyBox toRadians()
Converts the units of this SkyBox from degrees to radians.

Returns:
new sky box with converted range values

getConeBox

public static SkyBox getConeBox(double ra,
                                double dec,
                                double sr)
Returns a minimal SkyBox which encloses a given cone using radians. The declination range of the result will be of included type, but the right ascension range may be either included or excluded.

Parameters:
ra - cone centre right ascension in radians
dec - cone centre declination in radians
sr - cone radius in radians
Returns:
sky box enclosing cone, with angles in radians

calculateDeltaRa

public static double calculateDeltaRa(double dec,
                                      double sr)
Works out the minimum change in Right Ascension which will encompass all points within a given search radius at a given central declination.

Parameters:
dec - declination of the centre of the search region in radians
sr - radius of the search region in radians
Returns:
minimum change in radians of RA from the central value which will contain the entire search region


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