Class 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 vertices
      java.util.ArrayList getVertices()  
      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
      java.util.ArrayList 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 Detail

      • 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 Detail

      • 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 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.