Class EllipticalCone

java.lang.Object
cds.healpix.common.sphgeom.EllipticalCone

public class EllipticalCone extends Object
This class defines an elliptical cone. The cone is defined by a center (ra, dec), semi-major and semi-minor axis (a, b) which are angular distances (LOWER THAN pi/2!), and a position angle PA. In the SIN (or orthographic) projection, centered around (ra=0, dec=0), i.e. (x=1, y=0, z=0), the points (x, y, z) inside the ellise satifies: 1 / (1 - rho^2) * [ x^2 / sig_x^2 - 2 * rho * x * y / (sig_x * sig_y)+ y^2 / sig_y^2 ] with: - sig_x^2 = sin^2(a)sin^2(PA) + sin^(b)cos^2(PA) - sig_y^2 = sin^2(a)cos^2(PA) + sin^(b)sin^2(PA) - p* sig_x * sigy = cos(PA)sin(PA)(sin^2(a) - sin^2(b)) We also recall than, for a point P and the focii F0 and F1: PF0 + PF1 = 2a FOR THE MOC: compute one value of circumcircle per order (like in the RUST lib) - 2 ellipses per order (with +r_circul and -r_cirum) - and use the RUST cone approx method, but for the elliptivcal cone :)
Author:
F.-X. Pineau
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EllipticalCone(double lonRad, double latRad, double aRad, double bRad)
     
    EllipticalCone(double lonRad, double latRad, double aRad, double bRad, double posAngRad)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(double lonRad, double latRad)
    Returns true if the given point on the unit sphere is inside the elliptical cone.
    boolean
    containsCone(double lonRad, double latRad, double rRad)
    Returns true if the given cone is fully inside the elliptical cone.
    double
     
    double
     
    double
     
    double
     
    boolean
    overlapCone(double lonRad, double latRad, double rRad)
    squaredMahalanobisDistance Returns true if the given cone overlap the elliptical cone.
    double[][]
    pathAlongEdge(int halfNumberOfPoints)
    Returns the coordinates (lonRad, latRad) of points which are on the path along the ellipse edge on the unit sphere.
    void
    setProjCenter(double lon, double lat)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EllipticalCone

      public EllipticalCone(double lonRad, double latRad, double aRad, double bRad)
    • EllipticalCone

      public EllipticalCone(double lonRad, double latRad, double aRad, double bRad, double posAngRad)
  • Method Details

    • getA

      public double getA()
    • getB

      public double getB()
    • getSinA

      public double getSinA()
    • getSinB

      public double getSinB()
    • contains

      public boolean contains(double lonRad, double latRad)
      Returns true if the given point on the unit sphere is inside the elliptical cone.
      Parameters:
      lonRad - longitude of the point, in radians
      latRad - latitude of the point, in radians
      Returns:
      true if the given point on the unit sphere is inside the elliptical cone.
    • overlapCone

      public boolean overlapCone(double lonRad, double latRad, double rRad)
      squaredMahalanobisDistance Returns true if the given cone overlap the elliptical cone.
      Parameters:
      lonRad - longitude of the center of the cone, in radians
      latRad - latitude of the center of the cone, in radians
      rRad - cone radius, in radians
      Returns:
      true if the given cone overlap the elliptical cone.
    • containsCone

      public boolean containsCone(double lonRad, double latRad, double rRad)
      Returns true if the given cone is fully inside the elliptical cone.
      Parameters:
      lonRad - longitude of the center of the cone, in radians
      latRad - latitude of the center of the cone, in radians
      rRad - cone radius, in radians
      Returns:
      true if the given cone is fully inside the elliptical cone.
    • pathAlongEdge

      public double[][] pathAlongEdge(int halfNumberOfPoints)
      Returns the coordinates (lonRad, latRad) of points which are on the path along the ellipse edge on the unit sphere.
      Parameters:
      halfNumberOfPoints - half the wanted number of points in the path
      Returns:
      the coordinates (lonRad, latRad) of points which are on the path along the ellipse edge on the unit sphere.
    • setProjCenter

      public void setProjCenter(double lon, double lat)