Package cds.moc

Class Healpix

  • All Implemented Interfaces:
    HealpixImpl

    public final class Healpix
    extends java.lang.Object
    implements HealpixImpl
    HEALPix CDS wrapper Encapsulate the usage of the official HEALPix GAIA package The HEALPix ordering is always NESTED
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAXORDER
      Maximal HEALPix order supported by the library
    • Constructor Summary

      Constructors 
      Constructor Description
      Healpix()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long ang2pix​(int order, double lon, double lat)
      Provide the HEALPix number associated to a coord, for a given order
      static long log2​(long nside)  
      double[] pix2ang​(int order, long npix)
      Provide the spherical coord associated to an HEALPix number, for a given order
      static long pow2​(long order)  
      long[] queryDisc​(int order, double lon, double lat, double radius)
      Provide the list of HEALPix numbers fully covering a circle (for a specified order)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAXORDER

        public static final int MAXORDER
        Maximal HEALPix order supported by the library
        See Also:
        Constant Field Values
    • Constructor Detail

      • Healpix

        public Healpix()
    • Method Detail

      • ang2pix

        public long ang2pix​(int order,
                            double lon,
                            double lat)
                     throws java.lang.Exception
        Provide the HEALPix number associated to a coord, for a given order
        Specified by:
        ang2pix in interface HealpixImpl
        Parameters:
        order - HEALPix order [0..MAXORDER]
        lon - longitude (expressed in the Healpix frame)
        lat - latitude (expressed in the Healpix frame)
        Returns:
        HEALPix number
        Throws:
        java.lang.Exception
      • pix2ang

        public double[] pix2ang​(int order,
                                long npix)
                         throws java.lang.Exception
        Provide the spherical coord associated to an HEALPix number, for a given order
        Specified by:
        pix2ang in interface HealpixImpl
        Parameters:
        order - HEALPix order [0..MAXORDER]
        npix - HEALPix number
        Returns:
        coord (lon,lat) (expressed in the Healpix frame)
        Throws:
        java.lang.Exception
      • queryDisc

        public long[] queryDisc​(int order,
                                double lon,
                                double lat,
                                double radius)
                         throws java.lang.Exception
        Provide the list of HEALPix numbers fully covering a circle (for a specified order)
        Specified by:
        queryDisc in interface HealpixImpl
        Parameters:
        order - Healpix order
        lon - center longitude (expressed in the Healpix frame)
        lat - center latitude (expressed in the Healpix frame)
        radius - circle radius (in degrees)
        Returns:
        Throws:
        java.lang.Exception
      • pow2

        public static final long pow2​(long order)
      • log2

        public static final long log2​(long nside)