uk.ac.starlink.ttools.cone
Class PixtoolsHealpix

java.lang.Object
  extended by uk.ac.starlink.ttools.cone.PixtoolsHealpix
All Implemented Interfaces:
cds.moc.HealpixImpl

public class PixtoolsHealpix
extends Object
implements cds.moc.HealpixImpl

Healpix implementation for use with MOC library based on Kuropatkin's PixTools library. Use getInstance() to obtain the singleton instance of this class.

Since:
16 Dec 2011
Author:
Mark Taylor
See Also:
PixTools

Method Summary
 long ang2pix(int order, double lonDeg, double latDeg)
           
static PixtoolsHealpix getInstance()
          Returns the sole instance of this singleton class.
static int nsideToOrder(long nside)
          Turns the HEALPix Nside parameter into the MOC "order" parameter.
static long orderToNside(int order)
          Turns the MOC "order" parameter into the HEALPix Nside parameter.
 double[] pix2ang(int order, long ipix)
           
 long[] queryDisc(int order, double lonDeg, double latDeg, double radiusDeg)
           
 int sizeToNside(double sizeDeg)
          Returns an Nside value corresponding to a given angular size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

ang2pix

public long ang2pix(int order,
                    double lonDeg,
                    double latDeg)
Specified by:
ang2pix in interface cds.moc.HealpixImpl

pix2ang

public double[] pix2ang(int order,
                        long ipix)
Specified by:
pix2ang in interface cds.moc.HealpixImpl

queryDisc

public long[] queryDisc(int order,
                        double lonDeg,
                        double latDeg,
                        double radiusDeg)
Specified by:
queryDisc in interface cds.moc.HealpixImpl

sizeToNside

public int sizeToNside(double sizeDeg)
Returns an Nside value corresponding to a given angular size.

Parameters:
sizeDeg - size in degrees
Returns:
nside

orderToNside

public static long orderToNside(int order)
Turns the MOC "order" parameter into the HEALPix Nside parameter.

Parameters:
order -
Returns:
nside

nsideToOrder

public static int nsideToOrder(long nside)
Turns the HEALPix Nside parameter into the MOC "order" parameter.

Parameters:
nside - Nside
Returns:
order
Throws:
IllegalArgumentException - if nside is not suitable

getInstance

public static PixtoolsHealpix getInstance()
Returns the sole instance of this singleton class.

Returns:
instance


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