Package gov.fnal.eag.healpix
Class Region
- java.lang.Object
-
- gov.fnal.eag.healpix.Region
-
public class Region extends java.lang.Object
- 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
Constructors Constructor Description Region(double xMin, double xMax, double yMin, double yMax)
default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
getPolReg()
provides polar coordinates of the region verticesjava.util.ArrayList
getVertices()
boolean
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 regionjava.util.ArrayList
pixelize(double precision)
divides region on HealPix pixels of given size including pixels that only partly inside the region
-
-
-
Method Detail
-
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
public java.util.ArrayList getVertices()
- Returns:
- ArrayList of 3d vectors of vertices of the region
-
pixelize
public java.util.ArrayList pixelize(double precision) throws java.lang.Exception
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:
java.lang.Exception
-
getPolReg
public double[][] getPolReg()
provides polar coordinates of the region vertices- Returns:
- array of corner coordinates in form of polar thete,phi angles.
-
-