Package uk.ac.starlink.ttools.plot2.geom
Class SphereAngleRange
java.lang.Object
uk.ac.starlink.ttools.plot2.geom.SphereAngleRange
Represents the range of angular coordinates that are covered
by a given region.
- Since:
- 15 Aug 2018
- Author:
- Mark Taylor
-
Constructor Summary
ConstructorsConstructorDescriptionSphereAngleRange
(double phiLo, double phiHi, double thetaLo, double thetaHi) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionstatic SphereAngleRange
calculateRange
(double[] dlos, double[] dhis) Determines the angle range for a cube defined by Cartesian limits.double[]
Returns the limits of azimuthal angle.double[]
Returns the limits of polar angle.
-
Constructor Details
-
SphereAngleRange
public SphereAngleRange(double phiLo, double phiHi, double thetaLo, double thetaHi) Constructor.- Parameters:
phiLo
- phi lower boundphiHi
- phi upper boundthetaLo
- theta lower boundthetaHi
- 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
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 boundsdhis
- 3-element array giving cube upper bounds- Returns:
- angle range
-