Class Region

java.lang.Object
gov.fnal.eag.healpix.Region

public class Region extends 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

    Modifier and Type
    Method
    Description
    double[][]
    provides polar coordinates of the region vertices
     
    boolean
    inReg(double ra, double dec)
    return true if the point ra,dec is inside region
    boolean
    inRegPol(double phi, double theta)
    return true if point phi, theta is inside region
    pixelize(double precision)
    divides region on HealPix pixels of given size including pixels that only partly inside the region

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Region

      public Region(double xMin, double xMax, double yMin, double yMax)
      default constructor
      Parameters:
      xMin - ra min in degrees
      xMax - ra max in degrees
      yMin - dec min in degrees
      yMax - 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 degrees
      dec - 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 radians
      theta - in radians
      Returns:
      boolean true if in region
    • getVertices

      public ArrayList getVertices()
      Returns:
      ArrayList of 3d vectors of vertices of the region
    • pixelize

      public ArrayList pixelize(double precision) throws 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:
      Exception
    • getPolReg

      public double[][] getPolReg()
      provides polar coordinates of the region vertices
      Returns:
      array of corner coordinates in form of polar thete,phi angles.