Package gov.fnal.eag.healpix
Class Region
java.lang.Object
gov.fnal.eag.healpix.Region
- Author:
- kuropat The class represents square region on a sphere defined by raMin, raMax decMin,decMax in degrees. The dec varies from Pi/2 to -Pi/2. The ra varies from 0. inclusive to 2Pi exclusive. Negative value of ra will be corrected by adding 2Pi
-
Constructor Summary
ConstructorsConstructorDescriptionRegion
(double xMin, double xMax, double yMin, double yMax) default constructor -
Method Summary
Modifier and TypeMethodDescriptiondouble[][]
provides polar coordinates of the region verticesboolean
inReg
(double ra, double dec) return true if the point ra,dec is inside regionboolean
inRegPol
(double phi, double theta) return true if point phi, theta is inside regionpixelize
(double precision) divides region on HealPix pixels of given size including pixels that only partly inside the region
-
Constructor Details
-
Region
public Region(double xMin, double xMax, double yMin, double yMax) default constructor- Parameters:
xMin
- ra min in degreesxMax
- ra max in degreesyMin
- dec min in degreesyMax
- dec max in degrees
-
-
Method Details
-
inReg
public boolean inReg(double ra, double dec) return true if the point ra,dec is inside region- Parameters:
ra
- in degreesdec
- in degrees- Returns:
- boolean true if inside the region
-
inRegPol
public boolean inRegPol(double phi, double theta) return true if point phi, theta is inside region- Parameters:
phi
- in radianstheta
- in radians- Returns:
- boolean true if in region
-
getVertices
- Returns:
- ArrayList of 3d vectors of vertices of the region
-
pixelize
divides region on HealPix pixels of given size including pixels that only partly inside the region- Parameters:
precision
- - angular size of the division element in arcsec- Returns:
- ArrayList of pixel numbers in ring schema for specifyed resolution
- Throws:
Exception
-
getPolReg
public double[][] getPolReg()provides polar coordinates of the region vertices- Returns:
- array of corner coordinates in form of polar thete,phi angles.
-