Package healpix.essentials
Class HealpixUtils
java.lang.Object
healpix.essentials.HealpixUtils
Collection of utility functions.
- Author:
- Martin Reinecke
- Copyright:
- 2011-2014 Max-Planck-Society
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanapprox(double a, double b, double epsilon) static booleanapprox(float a, float b, float epsilon) static voidEvaluates cond; if it is false, throws an Exception containing errtxt.static doublecosdist_zphi(double z1, double phi1, double z2, double phi2) Computes the cosine of the angular distance between two z, phi positions on the unit sphere.static doublecosdist_zphi(Zphi zp1, Zphi zp2) Computes the cosine of the angular distance between two z, phi positions on the unit sphere.static doublefmodulo(double v1, double v2) Returns the remainder of the divisionv1/v2.static intilog2(long arg) Integer base 2 logarithm.static intisqrt(long arg) Integer square root.static longnest2peano(long pix, int order) static longpeano2nest(long pix, int order) static intuniq2order(long uniq) 
- 
Constructor Details- 
HealpixUtilspublic HealpixUtils()
 
- 
- 
Method Details- 
checkEvaluates cond; if it is false, throws an Exception containing errtxt.- Throws:
- Exception
 
- 
ilog2public static int ilog2(long arg) Integer base 2 logarithm.- Parameters:
- arg-
- Returns:
- the largest integer nthat fulfills2^n<=arg. For negative arguments and zero, 0 is returned.
 
- 
isqrtpublic static int isqrt(long arg) Integer square root.- Parameters:
- arg-
- Returns:
- the integer nwhich fulfillsn^2<=arg<(n+1)^2
 
- 
cosdist_zphipublic static double cosdist_zphi(double z1, double phi1, double z2, double phi2) Computes the cosine of the angular distance between two z, phi positions on the unit sphere.
- 
cosdist_zphiComputes the cosine of the angular distance between two z, phi positions on the unit sphere.
- 
fmodulopublic static double fmodulo(double v1, double v2) Returns the remainder of the divisionv1/v2. The result is non-negative.- Parameters:
- v1- dividend; can be positive or negative
- v2- divisor; must be positive
- Returns:
- remainder of the division; positive and smaller than v2
 
- 
approxpublic static boolean approx(float a, float b, float epsilon) 
- 
approxpublic static boolean approx(double a, double b, double epsilon) 
- 
uniq2orderpublic static int uniq2order(long uniq) 
- 
nest2peanopublic static long nest2peano(long pix, int order) 
- 
peano2nestpublic static long peano2nest(long pix, int order) 
 
-