|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthealpix.essentials.HealpixTables
healpix.essentials.HealpixBase
public class HealpixBase
Basic opersations related to the HEALPix pixelisation. This class is conceptually very similar the the Healpix_Base class of Healpix_cxx. It supports the NESTED scheme for nside parameters which are powers of 2, and the RING scheme for arbitrary positive nside parameters. The maximum supported nside parameter is 2^29.
Field Summary | |
---|---|
static long |
ns_max
Maximum Nside parameter; equivalent to 2^ order_max . |
static int |
order_max
Maximum order parameter |
Constructor Summary | |
---|---|
HealpixBase()
Initializes the object to Nside=1 and scheme=NESTED. |
|
HealpixBase(long nside_in,
Scheme scheme_in)
Initializes the object to a user-supplied Nside and ordering scheme. |
Method Summary | |
---|---|
long |
ang2pix(Pointing ptg)
Returns the pixel which contains the supplied Pointing. |
Vec3[] |
boundaries(long pix,
int step)
Returns a set of points along the boundary of the given pixel. |
long |
getNpix()
Returns the total number of pixels in the pixelisation. |
int |
getNside()
Returns the current Nside parameter. |
int |
getOrder()
Returns the current order parameter. |
Scheme |
getScheme()
Returns the current ordering scheme. |
double |
maxPixrad()
Returns the maximum angular distance between a pixel center and its corners. |
long[] |
neighbours(long ipix)
Returns the neighboring pixels of ipix. |
long |
nest2ring(long ipnest)
Returns ring pixel number for the supplied nested pixel number. |
static long |
npix2Nside(long npix)
Calculates the Nside parameter from the number of pixels. |
static long |
nside2Npix(long nside)
Calculates the number of pixels from the Nside parameter. |
static int |
nside2order(long nside)
Calculates the map order from its Nside parameter. |
static long |
order2Npix(int order)
Calculates the number of pixels from the order parameter. |
Pointing |
pix2ang(long pix)
Returns the Pointing corresponding to the center of the supplied pixel. |
long |
pix2ring(long pix)
Compute ring index from pixel number. |
Vec3 |
pix2vec(long pix)
Returns the normalized 3-vector corresponding to the center of the supplied pixel. |
Zphi |
pix2zphi(long pix)
Returns the Zphi corresponding to the center of the supplied pixel. |
RangeSet |
queryDisc(Pointing ptg,
double radius)
Returns a range set of pixels whose centers lie within a given disk. |
RangeSet |
queryDiscInclusive(Pointing ptg,
double radius,
int fact)
Returns a range set of pixels which overlap with a given disk. |
RangeSet |
queryPolygon(Pointing[] vertex)
Returns a range set of pixels whose centers lie within the convex polygon defined by the vertex array. |
RangeSet |
queryPolygonInclusive(Pointing[] vertex,
int fact)
Returns a range set of pixels that overlap with the convex polygon defined by the vertex array. |
RangeSet |
queryStrip(double theta1,
double theta2,
boolean inclusive)
Returns a range set of pixels whose centers lie within a given latitude range (if inclusive==false ), or which overlap with this range
(if inclusive==true ). |
long |
ring2nest(long ipring)
Returns nested pixel number for the supplied ring pixel number. |
double |
ring2theta(long ring)
Returns the colatitude for the requested ring. |
double |
ring2z(long ring)
Returns the z-coordinate (equivalent to the cosine of the colatitude) for the requested ring. |
void |
setNside(long nside_in)
Adjusts the object to nside_in. |
void |
setNsideAndScheme(long nside_in,
Scheme scheme_in)
Adjusts the object to nside_in and scheme_in. |
void |
setScheme(Scheme scheme_in)
Adjusts the object to scheme. |
long |
vec2pix(Vec3 vec)
Returns the pixel which contains the supplied Vec3. |
long |
zphi2pix(Zphi zphi)
Returns the pixel which contains the supplied Zphi. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int order_max
public static final long ns_max
order_max
.
Constructor Detail |
---|
public HealpixBase()
public HealpixBase(long nside_in, Scheme scheme_in) throws Exception
nside_in
- the Nside parameterscheme_in
- the ordering scheme
Exception
Method Detail |
---|
public static int nside2order(long nside) throws Exception
nside
- the Nside parameter
nside
; -1 if
nside
is not a power of 2.
Exception
public static long npix2Nside(long npix) throws Exception
npix
- the number of pixels
Exception
public static long nside2Npix(long nside) throws Exception
nside
- the Nside parameter
Exception
public static long order2Npix(int order) throws Exception
order
- the order parameter
Exception
public void setNside(long nside_in) throws Exception
nside_in
- the new Nside parameter
Exception
public void setNsideAndScheme(long nside_in, Scheme scheme_in) throws Exception
nside_in
- the new Nside parameterscheme_in
- the new ordering scheme
Exception
public Scheme getScheme()
public int getNside()
public long getNpix()
public void setScheme(Scheme scheme_in) throws Exception
scheme_in
- the new ordering scheme
Exception
public int getOrder()
public long ang2pix(Pointing ptg) throws Exception
ptg
- the requested location on the sphere.
Exception
public Pointing pix2ang(long pix) throws Exception
pix
- the requested pixel number.
Exception
public long vec2pix(Vec3 vec) throws Exception
vec
- the requested location on the sphere (need not be normalized).
Exception
public Vec3 pix2vec(long pix) throws Exception
pix
- the requested pixel number.
Exception
public long ring2nest(long ipring) throws Exception
ipring
- the requested pixel number in RING scheme.
Exception
public long nest2ring(long ipnest) throws Exception
ipnest
- the requested pixel number in NESTED scheme.
Exception
public long zphi2pix(Zphi zphi)
zphi
- the requested location on the sphere.
public Zphi pix2zphi(long pix)
pix
- the requested pixel number.
public long[] neighbours(long ipix) throws Exception
ipix
- the requested pixel number.
Exception
public double maxPixrad()
public double ring2z(long ring)
ring
- ring index: the northernmost ring in the map has index 1;
ring indices are increasing towards the South pole.
public double ring2theta(long ring)
ring
- ring index: the northernmost ring in the map has index 1;
ring indices are increasing towards the South pole.
public RangeSet queryStrip(double theta1, double theta2, boolean inclusive) throws Exception
inclusive==false
), or which overlap with this range
(if inclusive==true
).The latitude range is defined as follows:
theta1<theta2
, it is the range between theta1
and theta2
theta2
, and between
theta1
and pi.
Exception
public RangeSet queryDisc(Pointing ptg, double radius) throws Exception
This method is more efficient in the RING scheme.
ptg
- the angular coordinates of the disk centerradius
- the radius (in radians) of the disk
Exception
public RangeSet queryDiscInclusive(Pointing ptg, double radius, int fact) throws Exception
This method is more efficient in the RING scheme.
This method may return some pixels which don't overlap with
the polygon at all. The higher fact
is chosen, the fewer false
positives are returned, at the cost of increased run time.
ptg
- the angular coordinates of the disk centerradius
- the radius (in radians) of the diskfact
- The overlapping test will be done at the resolution
fact*nside
. For NESTED ordering, fact
must be a power
of 2, else it can be any positive integer. A typical choice would be 4.
Exception
public RangeSet queryPolygon(Pointing[] vertex) throws Exception
vertex
array. This method is more efficient in the RING scheme.
vertex
- an array containing the vertices of the requested convex
polygon.
Exception
public RangeSet queryPolygonInclusive(Pointing[] vertex, int fact) throws Exception
vertex
array. This method is more efficient in the RING scheme.
This method may return some pixels which don't overlap with
the polygon at all. The higher fact
is chosen, the fewer false
positives are returned, at the cost of increased run time.
vertex
- an array containing the vertices of the requested convex
polygon.fact
- The overlapping test will be done at the resolution
fact*nside
. For NESTED ordering, fact
must be a power
of 2, else it can be any positive integer. A typical choice would be 4.
Exception
public long pix2ring(long pix)
pix
- pixel number
public Vec3[] boundaries(long pix, int step) throws Exception
pix
- pixel index numberstep
- the number of returned points is 4*step
Vec3
for each point
Exception
|
"Built from revision exported" | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |