healpix.core
Class HealpixIndex

java.lang.Object
  extended byhealpix.core.HealpixIndex

public class HealpixIndex
extends java.lang.Object


Field Summary
 double fact1
           
 double fact2
           
 int ncap
           
 int nl2
           
 int nl3
           
 int nl4
           
 int npface
           
 int npix
           
static int ns_max
           
 int nside
           
static double pi
           
static double piover2
           
static double twopi
           
static double z0
           
 
Constructor Summary
HealpixIndex()
           
HealpixIndex(int nside)
           
 
Method Summary
static double[] ang(edu.jhu.htm.core.Vector3d vec)
           
 int ang2pix_nest(double theta, double phi)
          renders the pixel number ipix (NESTED scheme) for a pixel which contains a point on a sphere at coordinates theta and phi, given the map resolution parametr nside the computation is made to the highest resolution available (nside=8192) and then degraded to that required (by integer division) this doesn't cost more, and it makes sure that the treatement of round-off will be consistent for every resolution
 int ang2pix_ring(double theta, double phi)
          renders the pixel number ipix (RING scheme) for a pixel which contains a point on a sphere at coordinates theta and phi, given the map resolution parametr nside the computation is made to the highest resolution available (nside=8192) and then degraded to that required (by integer division) this doesn't cost more, and it makes sure that the treatement of round-off will be consistent for every resolution
 edu.jhu.htm.core.Vector3d[] corners_nest(int pix, int step)
           
 edu.jhu.htm.core.Vector3d[] corners_ring(int pix, int step)
          return set of points along the boundary of the given pixel step 1 gives 4 points on the corners
protected  void init()
           
 double[] integration_limits_in_costh(int i_th)
           
protected static void mkpix2xy()
          Initialize pix2x and pix2y constructs the array giving x and y in the face from pixel number for the nested (quad-cube like) ordering of pixels the bits corresponding to x and y are interleaved in the pixel number one breaks up the pixel number by even and odd bits
protected static void mkxy2pix()
          Initialize x2pix and y2pix
 int nest2ring(int ipnest)
          performs conversion from NESTED to RING pixel number
 double[] pix2ang_nest(int ipix)
          Convert from pix number to angle renders theta and phi coordinates of the nominal pixel center for the pixel number ipix (NESTED scheme) given the map resolution parameter nside
 double[] pix2ang_ring(int ipix)
          Convert from pix number to angle renders theta and phi coordinates of the nominal pixel center for the pixel number ipix (RING scheme) given the map resolution parameter nside
 edu.jhu.htm.core.Vector3d pix2vec_nest(int pix)
           
 edu.jhu.htm.core.Vector3d pix2vec_ring(int pix)
           
 java.awt.Point pix2xy_nest(int ipix)
          Convert from pix number to x,y inside a given face.
 java.awt.Point pix2xy_nestface(int ipix)
          Convert from pix number to x,y inside a given face.
 double[] pixel_boundaries(double i_th, double i_phi, int i_zone, double cos_theta)
          calculate the points of crosing for a given theata on the boundaries of the pixel - returns the left and right phi crosings
 int ring(int ipix)
          return ring number for given pix in ring scheme
 int ring2nest(int ipring)
          performs conversion from RING to NESTED pixel number
 int vec2pix_nest(edu.jhu.htm.core.Vector3d vec)
          unit vector to pix number
 int vec2pix_ring(edu.jhu.htm.core.Vector3d vec)
           
static edu.jhu.htm.core.Vector3d vector(double theta, double phi)
           
 int xy2pix_nest(int ix, int iy)
          Convert from a x,y in a given face to a pix number in a face withour offset.
 int xy2pix_nest(int ix, int iy, int face)
          Convert from a x,y in a given face to a pix number.
 int xy2pix_nest(java.awt.Point p, int face)
          Convert from a point in a given face to a pix number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

piover2

public static final double piover2
See Also:
Constant Field Values

pi

public static final double pi
See Also:
Constant Field Values

twopi

public static final double twopi
See Also:
Constant Field Values

ns_max

public static final int ns_max
See Also:
Constant Field Values

z0

public static final double z0
See Also:
Constant Field Values

nside

public int nside

nl2

public int nl2

nl3

public int nl3

nl4

public int nl4

npface

public int npface

npix

public int npix

ncap

public int ncap

fact1

public double fact1

fact2

public double fact2
Constructor Detail

HealpixIndex

public HealpixIndex()

HealpixIndex

public HealpixIndex(int nside)
             throws java.lang.Exception
Method Detail

init

protected void init()

mkpix2xy

protected static void mkpix2xy()
Initialize pix2x and pix2y constructs the array giving x and y in the face from pixel number for the nested (quad-cube like) ordering of pixels the bits corresponding to x and y are interleaved in the pixel number one breaks up the pixel number by even and odd bits


mkxy2pix

protected static void mkxy2pix()
Initialize x2pix and y2pix


ang2pix_nest

public int ang2pix_nest(double theta,
                        double phi)
                 throws java.lang.Exception
renders the pixel number ipix (NESTED scheme) for a pixel which contains a point on a sphere at coordinates theta and phi, given the map resolution parametr nside the computation is made to the highest resolution available (nside=8192) and then degraded to that required (by integer division) this doesn't cost more, and it makes sure that the treatement of round-off will be consistent for every resolution

Throws:
java.lang.Exception

pix2ang_nest

public double[] pix2ang_nest(int ipix)
                      throws java.lang.Exception
Convert from pix number to angle renders theta and phi coordinates of the nominal pixel center for the pixel number ipix (NESTED scheme) given the map resolution parameter nside

Throws:
java.lang.Exception

pix2ang_ring

public double[] pix2ang_ring(int ipix)
                      throws java.lang.Exception
Convert from pix number to angle renders theta and phi coordinates of the nominal pixel center for the pixel number ipix (RING scheme) given the map resolution parameter nside

Throws:
java.lang.Exception

ang2pix_ring

public int ang2pix_ring(double theta,
                        double phi)
                 throws java.lang.Exception
renders the pixel number ipix (RING scheme) for a pixel which contains a point on a sphere at coordinates theta and phi, given the map resolution parametr nside the computation is made to the highest resolution available (nside=8192) and then degraded to that required (by integer division) this doesn't cost more, and it makes sure that the treatement of round-off will be consistent for every resolution

Throws:
java.lang.Exception

nest2ring

public int nest2ring(int ipnest)
              throws java.lang.Exception
performs conversion from NESTED to RING pixel number

Throws:
java.lang.Exception

ring2nest

public int ring2nest(int ipring)
              throws java.lang.Exception
performs conversion from RING to NESTED pixel number

Throws:
java.lang.Exception

pix2xy_nest

public java.awt.Point pix2xy_nest(int ipix)
                           throws java.lang.Exception
Convert from pix number to x,y inside a given face. 0,0 is the lower right corner of the face.

Throws:
java.lang.Exception

xy2pix_nest

public int xy2pix_nest(int ix,
                       int iy,
                       int face)
                throws java.lang.Exception
Convert from a x,y in a given face to a pix number.

Throws:
java.lang.Exception

xy2pix_nest

public int xy2pix_nest(java.awt.Point p,
                       int face)
                throws java.lang.Exception
Convert from a point in a given face to a pix number. Convenience method just unpacks the point to x and y and calls the other xy2pix_nest method.

Throws:
java.lang.Exception

xy2pix_nest

public int xy2pix_nest(int ix,
                       int iy)
                throws java.lang.Exception
Convert from a x,y in a given face to a pix number in a face withour offset.

Throws:
java.lang.Exception

pix2xy_nestface

public java.awt.Point pix2xy_nestface(int ipix)
                               throws java.lang.Exception
Convert from pix number to x,y inside a given face. 0,0 is the lower right corner of the face.

Throws:
java.lang.Exception

integration_limits_in_costh

public double[] integration_limits_in_costh(int i_th)

pixel_boundaries

public double[] pixel_boundaries(double i_th,
                                 double i_phi,
                                 int i_zone,
                                 double cos_theta)
calculate the points of crosing for a given theata on the boundaries of the pixel - returns the left and right phi crosings


ring

public int ring(int ipix)
         throws java.lang.Exception
return ring number for given pix in ring scheme

Throws:
java.lang.Exception

vector

public static edu.jhu.htm.core.Vector3d vector(double theta,
                                               double phi)

ang

public static double[] ang(edu.jhu.htm.core.Vector3d vec)

vec2pix_nest

public int vec2pix_nest(edu.jhu.htm.core.Vector3d vec)
                 throws java.lang.Exception
unit vector to pix number

Throws:
java.lang.Exception

vec2pix_ring

public int vec2pix_ring(edu.jhu.htm.core.Vector3d vec)
                 throws java.lang.Exception
Throws:
java.lang.Exception

pix2vec_nest

public edu.jhu.htm.core.Vector3d pix2vec_nest(int pix)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

pix2vec_ring

public edu.jhu.htm.core.Vector3d pix2vec_ring(int pix)
                                       throws java.lang.Exception
Throws:
java.lang.Exception

corners_nest

public edu.jhu.htm.core.Vector3d[] corners_nest(int pix,
                                                int step)
                                         throws java.lang.Exception
Throws:
java.lang.Exception

corners_ring

public edu.jhu.htm.core.Vector3d[] corners_ring(int pix,
                                                int step)
                                         throws java.lang.Exception
return set of points along the boundary of the given pixel step 1 gives 4 points on the corners

Throws:
java.lang.Exception