|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.tools.pixtools.PixTools
public abstract class PixTools
contains methods translated from HEALPix Fortran90 with increased map resolution in comparison to original Fortran code.
Constructor Summary | |
---|---|
PixTools()
|
Method Summary | |
---|---|
static long |
ang2pix_nest(long nside,
double theta,
double phi)
renders the pixel number pix (NESTED scheme) for a pixel which contains a point on a sphere at coordinates theta and phi, given map resolution parameter nside. |
static long |
ang2pix_ring(long nside,
double theta,
double phi)
renders the pixel number ipix (RING scheme) for a pixel which contains a point with coordinates theta and phi, given the map resolution parameter nside. |
static java.lang.Object[] |
convert_inplace_long(java.lang.String subcall,
java.lang.Object[] map)
converts a 8 byte Object map from RING to NESTED and vice versa in place, ie without allocation a temporary map (Has no reason for Java). |
static java.lang.Object[] |
convert_nest2ring(long nside,
java.lang.Object[] map)
make the conversion NEST to RING |
static java.lang.Object[] |
convert_ring2nest(long nside,
java.lang.Object[] map)
makes the conversion RING to NEST |
static long |
getHealpixMax(int n1,
long n,
int n2,
boolean nside)
|
static long |
getHealpixMin(int n1,
long n,
int n2,
boolean nside)
|
static java.util.ArrayList |
getNeighbours(long nside,
long ipix)
|
static long |
GetNSide(double pixsize)
calculate requared nside given pixel size in arcsec |
static java.util.ArrayList |
InRing(long nside,
long iz,
double phi0,
double dphi,
boolean nest)
returns the list of pixels in RING or NEST scheme with latitude in [phi0 - dpi, phi0 + dphi] on the ring iz in [1, 4*nside -1 ] The pixel id numbers are in [0, 12*nside^2 - 1] the indexing is in RING, unless nest is set to 1 |
static double[] |
intrs_intrv(double[] d1,
double[] d2)
computes the intersection di of 2 intervals d1 (= [a1,b1]) and d2 (= [a2,b2]) on the periodic domain (=[A,B] where A and B arbitrary) ni is the resulting number of intervals (0,1, or 2) if a1 |
static java.util.ArrayList |
neighbours_nest(long nside,
long ipix)
returns 7 or 8 neighbours of any pixel in the nested scheme The neighbours are ordered in the following way: First pixel is the one to the south ( the one west of the south direction is taken for pixels that don't have a southern neighbour). |
static long |
nest2ring(long nside,
long ipnest)
converts from NESTED to RING pixel numbering |
static long |
next_in_line_nest(long nside,
long ipix)
calculates the pixel that lies on the East side (and the same latitude) as the given NESTED pixel number - ipix |
static long |
Npix2Nside(long npix)
returns nside such that npix = 12*nside^2, nside should be power of 2 and smaller than ns_max if not return -1 |
static long |
Nside2Npix(long nside)
calculates npix such that npix = 12*nside^2 ,nside should be a power of 2, and smaller than ns_max otherwise return -1 |
static double[] |
pix2ang_nest(double[] res,
long nside,
long ipix)
|
static double[] |
pix2ang_nest(long nside,
long ipix)
Renders theta and phi coordinates of the normal pixel center for the pixel number ipix (NESTED scheme) given the map resolution parameter nside. |
static double[] |
pix2ang_ring(long nside,
long ipix)
renders theta and phi coordinates of the nominal pixel center for the pixel number ipix (RING scheme) given the map resolution parameter nside |
static double |
PixRes(long nside)
calculates angular resolution of the pixel map in arc seconds. |
static double[] |
PolarToRaDec(double[] polar)
returns ra, dec in degrees given polar coordinates in radians |
static double[] |
PolarToRaDec(double[] polar,
double[] radec)
|
static java.util.ArrayList |
query_strip(long nside,
double theta1,
double theta2,
long nest)
finds pixels having a colatitude (measured from North pole) : theta1 < colatitude < theta2 with o <= theta1 < theta2 <= Pi if theta2 < theta1 then pixels with 0 <= colatitude < theta2 or theta1 < colatitude < Pi are returned |
static double[] |
RaDecToPolar(double[] radec)
returns polar coordinates in radians given ra, dec in degrees |
static long |
ring2nest(long nside,
long ipring)
converts pixel number from ring numbering schema to the nested one |
static long |
RingNum(long nside,
double z)
returns the ring number in {1, 4*nside - 1} calculated from z coordinate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PixTools()
Method Detail |
---|
public static java.util.ArrayList query_strip(long nside, double theta1, double theta2, long nest) throws java.lang.Exception
nside
- long the map resolution parametertheta1
- lower edge of the colatitudetheta2
- upper edge of the colatitudenest
- long if = 1 result is in NESTED scheme
java.lang.Exception
java.lang.IllegalArgumentException
public static double[] intrs_intrv(double[] d1, double[] d2)
d1
- double[] first intervald2
- double[] second interval
public static double[] pix2ang_ring(long nside, long ipix)
nside
- long map resolutionipix
- long pixel number
public static long ang2pix_ring(long nside, double theta, double phi)
nside
- long map resolution parametertheta
- double thetaphi
- -
double phi
public static double[] pix2ang_nest(long nside, long ipix)
nside
- map resolution parameter - longipix
- long pixel number
java.lang.IllegalArgumentException
public static double[] pix2ang_nest(double[] res, long nside, long ipix)
public static long ang2pix_nest(long nside, double theta, double phi)
nside
- the map resolution parametertheta
- double theta coordinatephi
- double phi coordinate
java.lang.IllegalArgumentException
public static java.lang.Object[] convert_nest2ring(long nside, java.lang.Object[] map)
nside
- the map resolution parametermap
- Object[] the map in NESTED scheme
java.lang.IllegalArgumentException
public static java.lang.Object[] convert_ring2nest(long nside, java.lang.Object[] map)
nside
- long resolutionmap
- map in RING
java.lang.IllegalArgumentException
public static java.lang.Object[] convert_inplace_long(java.lang.String subcall, java.lang.Object[] map)
subcall
- String name of the method to use.map
- Object[] map
java.lang.IllegalArgumentException
public static java.util.ArrayList neighbours_nest(long nside, long ipix)
nside
- the map resolutionipix
- long pixel number
java.lang.IllegalArgumentException
public static java.util.ArrayList InRing(long nside, long iz, double phi0, double dphi, boolean nest)
nside
- long the map resolutioniz
- long ring numberphi0
- doubledphi
- doublenest
- boolean format flag
java.lang.IllegalArgumentException
public static long next_in_line_nest(long nside, long ipix)
nside
- long resolutionipix
- long pixel number
java.lang.IllegalArgumentException
public static long ring2nest(long nside, long ipring)
nside
- long resolutionipring
- long pixel number in ring schema
java.lang.IllegalArgumentException
public static long nest2ring(long nside, long ipnest)
nside
- long resolutionipnest
- long NEST pixel number
java.lang.IllegalArgumentException
public static long RingNum(long nside, double z)
nside
- long resolutionz
- double z coordinate
public static long Npix2Nside(long npix)
npix
- long the number of pixels in the map
public static long Nside2Npix(long nside)
nside
- long the map resolution
public static double PixRes(long nside)
nside
-
public static long GetNSide(double pixsize)
pixsize
- in arcsec
public static double[] RaDecToPolar(double[] radec)
radec
- double array containing ra,dec in degrees
public static double[] PolarToRaDec(double[] polar)
polar
- double array polar[0] = phi in radians
polar[1] = theta in radians
public static double[] PolarToRaDec(double[] polar, double[] radec)
public static long getHealpixMax(int n1, long n, int n2, boolean nside)
public static long getHealpixMin(int n1, long n, int n2, boolean nside)
public static java.util.ArrayList getNeighbours(long nside, long ipix)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |