Class SphereAngleRange

java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SphereAngleRange

public class SphereAngleRange extends Object
Represents the range of angular coordinates that are covered by a given region.
Since:
15 Aug 2018
Author:
Mark Taylor
  • Constructor Details

    • SphereAngleRange

      public SphereAngleRange(double phiLo, double phiHi, double thetaLo, double thetaHi)
      Constructor.
      Parameters:
      phiLo - phi lower bound
      phiHi - phi upper bound
      thetaLo - theta lower bound
      thetaHi - theta upper bound
  • Method Details

    • getPhiLimits

      public double[] getPhiLimits()
      Returns the limits of azimuthal angle. A pair of values is returned; the first is always lower than the second, but neither is guaranteed to lie within a given range.
      Returns:
      2-element array giving (lo, hi) limits on phi
    • getThetaLimits

      public double[] getThetaLimits()
      Returns the limits of polar angle. A pair of values is returned; the first is lower than the second, and both are in the range (-PI/2..+PI/2).
      Returns:
      2-element array giving (lo, hi) limits on theta
    • calculateRange

      public static SphereAngleRange calculateRange(double[] dlos, double[] dhis)
      Determines the angle range for a cube defined by Cartesian limits. Note: This code hasn't been tried or tested at all, it may contain more or less serious errors.
      Parameters:
      dlos - 3-element array giving cube lower bounds
      dhis - 3-element array giving cube upper bounds
      Returns:
      angle range