Package cds.moc

Class Healpix

java.lang.Object
cds.moc.Healpix
All Implemented Interfaces:
HealpixImpl

public final class Healpix extends Object implements HealpixImpl
HEALPix CDS wrapper Encapsulate the usage of the HEALpix lib The HEALPix ordering is always NESTED
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    Healpix Utilities
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    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 double
    getPixelArea(int order)
    Pixel area (in square degrees) for a given HEALPix order
    double[]
    pix2ang(int order, long npix)
    Provide the spherical coord associated to an HEALPix number, for a given order
    static final 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 Details

    • SKYAREA

      public static final double SKYAREA
      Healpix Utilities
  • Constructor Details

    • Healpix

      public Healpix()
  • Method Details

    • ang2pix

      public long ang2pix(int order, double lon, double lat) throws 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:
      Exception
    • pix2ang

      public double[] pix2ang(int order, long npix) throws 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:
      Exception
    • queryDisc

      public long[] queryDisc(int order, double lon, double lat, double radius) throws 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:
      Exception
    • pow2

      public static final long pow2(long order)
    • getPixelArea

      public static double getPixelArea(int order)
      Pixel area (in square degrees) for a given HEALPix order