DiscTest (javadoc for PixTools)
Date: 2012-07-30

gov.fnal.eag.healpix.test

## Class DiscTest

- java.lang.Object
- - gov.fnal.eag.healpix.test.DiscTest

-     public class DiscTest
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `nCheck`
    `private int` | `nFail`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DiscTest()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `checkOverlap(int order, double raDeg1, double decDeg1, double raDeg2, double decDeg2)`
    `(package private) static double` | `haversineSeparationFormula(double ra1, double dec1, double ra2, double dec2)` Haversine formula for spherical trigonometry.
    `(package private) static java.util.Collection` | `intersection(java.util.Collection c1, java.util.Collection c2)`
    `static void` | `main(java.lang.String[] args)`
    `(package private) static long` | `orderToNside(int order)`
    `java.util.Collection` | `queryDisc(int order, double ra, double dec, double radius)`
    `java.lang.String` | `report()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### nCheck

          private int nCheck

    - #### nFail

          private int nFail

  - ### Constructor Detail

    - #### DiscTest

          public DiscTest()

  - ### Method Detail

    - #### checkOverlap

          public void checkOverlap(int order,
                          double raDeg1,
                          double decDeg1,
                          double raDeg2,
                          double decDeg2)
                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### queryDisc

          public java.util.Collection queryDisc(int order,
                                       double ra,
                                       double dec,
                                       double radius)

    - #### report

          public java.lang.String report()

    - #### orderToNside

          static long orderToNside(int order)

    - #### intersection

          static java.util.Collection intersection(java.util.Collection c1,
                                          java.util.Collection c2)

    - #### haversineSeparationFormula

          static double haversineSeparationFormula(double ra1,
                                          double dec1,
                                          double ra2,
                                          double dec2)

      Haversine formula for spherical trigonometry. This does not have the numerical instabilities of the cosine formula at small angles.

      This implementation derives from Bob Chamberlain's contribution to the comp.infosystems.gis FAQ; he cites R.W.Sinnott, "Virtues of the Haversine", Sky and Telescope vol.68, no.2, 1984, p159.

      Parameters:
        `ra1` - right ascension of point 1 in radians
        `dec1` - declination of point 1 in radians
        `ra2` - right ascension of point 2 in radians
        `dec2` - declination of point 2 in radians
      Returns:
        angular separation of point 1 and point 2 in radians
      See Also:

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`