LSSTApplications
12.1-5-gbdcc3ab,15.0+10,15.0+19,15.0-1-g19261fa+10,15.0-1-g60afb23+19,15.0-1-g615e0bb+11,15.0-1-g6668b0b+6,15.0-1-g788a293+19,15.0-1-ga91101e+19,15.0-1-gae1598d+9,15.0-1-gd076f1f+17,15.0-1-gdf18595+3,15.0-1-gf4f1c34+9,15.0-10-g113cadf7+2,15.0-11-g5674e3b,15.0-2-g100d730+12,15.0-2-g20c4630+8,15.0-2-g35685a8+15,15.0-2-g5dfaa72+8,15.0-2-gf38729e+14,15.0-24-g02ed2a30c+2,15.0-3-g11fe1a0+3,15.0-3-g130a88a+2,15.0-3-g707930d+1,15.0-3-g9103c06+9,15.0-3-ga03b4ca+26,15.0-3-gaec6799+6,15.0-4-g32c2b40+2,15.0-4-g535e784+3,15.0-4-g654b129+17,15.0-5-g23e394c+7,15.0-5-g54bfcd9+2,15.0-5-gb31927c,15.0-6-g4418537+2,15.0-7-g0c26201,15.0-7-g6bb3a066+2,15.0-9-g5661f8f+4,w.2018.18
LSSTDataManagementBasePackage
|
Classes | |
class | _SubList |
class | PartitionMap |
class | SphericalBox |
class | SphericalBoxPartitionMap |
class | SphericalCircle |
class | SphericalConvexPolygon |
class | SphericalEllipse |
class | SphericalRegion |
Functions | |
def | isinf (x) |
def | dot (v1, v2) |
def | cross (v1, v2) |
def | invScale (v, s) |
def | normalize (v) |
def | sphericalCoords (args) |
def | cartesianUnitVector (args) |
def | sphericalAngularSep (p1, p2) |
def | clampPhi (phi) |
def | reduceTheta (theta) |
def | northEast (v) |
def | alpha (r, centerPhi, phi) |
def | maxAlpha (r, centerPhi) |
def | cartesianAngularSep (v1, v2) |
def | minEdgeSep (p, n, v1, v2) |
def | minPhiEdgeSep (p, phi, minTheta, maxTheta) |
def | minThetaEdgeSep (p, theta, minPhi, maxPhi) |
def | centroid (vertices) |
def | between (p, n, v1, v2) |
def | segments (phiMin, phiMax, width) |
def | median (array) |
def | hemispherical (points) |
def | convex (vertices) |
def | convexHull (points) |
Variables | |
float | ARCSEC_PER_DEG = 3600.0 |
float | DEG_PER_ARCSEC = 1.0 / 3600.0 |
float | ANGLE_EPSILON = 0.001 * DEG_PER_ARCSEC |
float | POLE_EPSILON = 1.0 * DEG_PER_ARCSEC |
float | COS_MAX = 1.0 - 1.0e-15 |
int | CROSS_N2MIN = 2e-15 |
SIN_MIN = math.sqrt(CROSS_N2MIN) | |
INF = float('inf') | |
NEG_INF = float('-inf') | |
MAX_FLOAT = float_info.max | |
MIN_FLOAT = float_info.min | |
EPSILON = float_info.epsilon | |
isinf = math.isinf | |
def lsst.geom.geometry.alpha | ( | r, | |
centerPhi, | |||
phi | |||
) |
Returns the longitude angle alpha of the intersections (alpha, phi), (-alpha, phi) of the circle centered on (0, centerPhi) with radius r and the plane z = sin(phi). If there is no intersection, None is returned.
Definition at line 222 of file geometry.py.
def lsst.geom.geometry.between | ( | p, | |
n, | |||
v1, | |||
v2 | |||
) |
Tests whether p lies on the shortest great circle arc from cartesian unit vectors v1 to v2, assuming that p is a unit vector on the plane defined by the origin, v1 and v2.
Definition at line 329 of file geometry.py.
def lsst.geom.geometry.cartesianAngularSep | ( | v1, | |
v2 | |||
) |
Returns the angular separation in degrees between points v1 and v2, which must both be specified as cartesian 3-vectors.
Definition at line 260 of file geometry.py.
def lsst.geom.geometry.cartesianUnitVector | ( | args | ) |
Returns a unit cartesian 3-vector corresponding to the input coordinates, which can be spherical or 3D cartesian. The 2 (spherical) or 3 (cartesian 3-vector) input coordinates can either be passed individually or as a tuple/list, and can be of any type convertible to a float.
Definition at line 141 of file geometry.py.
def lsst.geom.geometry.centroid | ( | vertices | ) |
Computes the centroid of a set of vertices (which must be passed in as a list of cartesian unit vectors) on the unit sphere.
Definition at line 316 of file geometry.py.
def lsst.geom.geometry.clampPhi | ( | phi | ) |
Clamps the input latitude angle phi to [-90.0, 90.0] deg.
Definition at line 184 of file geometry.py.
def lsst.geom.geometry.convex | ( | vertices | ) |
Tests whether an ordered list of vertices (which must be specified as cartesian unit vectors) form a spherical convex polygon and determines their winding order. Returns a 2-tuple as follows: (True, True): The vertex list forms a spherical convex polygon and is in counter-clockwise order when viewed from outside the unit sphere in a right handed coordinate system. (True, False): The vertex list forms a spherical convex polygon and is in in clockwise order. (False, msg): The vertex list does not form a spherical convex polygon - msg is a string describing why the test failed. The algorithm completes in O(n) time, where n is the number of input vertices.
Definition at line 1782 of file geometry.py.
def lsst.geom.geometry.convexHull | ( | points | ) |
Computes the convex hull (a spherical convex polygon) of an unordered list of points on the unit sphere, which must be passed in as cartesian unit vectors. The algorithm takes O(n log n) time, where n is the number of points.
Definition at line 1853 of file geometry.py.
def lsst.geom.geometry.cross | ( | v1, | |
v2 | |||
) |
Returns the cross product of cartesian 3-vectors v1 and v2.
Definition at line 85 of file geometry.py.
def lsst.geom.geometry.dot | ( | v1, | |
v2 | |||
) |
Returns the dot product of cartesian 3-vectors v1 and v2.
Definition at line 79 of file geometry.py.
def lsst.geom.geometry.hemispherical | ( | points | ) |
Tests whether a set of points is hemispherical, i.e. whether a plane exists such that all points are strictly on one side of the plane. The algorithm used is Megiddo's algorithm for linear programming in R2 and has run-time O(n), where n is the number of points. Points must be passed in as a list of cartesian unit vectors.
Definition at line 1740 of file geometry.py.
def lsst.geom.geometry.invScale | ( | v, | |
s | |||
) |
Returns a copy of the cartesian 3-vector v scaled by 1 / s.
Definition at line 93 of file geometry.py.
def lsst.geom.geometry.isinf | ( | x | ) |
Definition at line 73 of file geometry.py.
def lsst.geom.geometry.maxAlpha | ( | r, | |
centerPhi | |||
) |
Computes alpha, the extent in longitude angle [-alpha, alpha] of the circle with radius r and center (0, centerPhi) on the unit sphere. Both r and centerPhi are assumed to be in units of degrees. centerPhi is clamped to lie in the range [-90,90] and r must lie in the range [0, 90].
Definition at line 240 of file geometry.py.
def lsst.geom.geometry.median | ( | array | ) |
Finds the median element of the given array in linear time.
Definition at line 1544 of file geometry.py.
def lsst.geom.geometry.minEdgeSep | ( | p, | |
n, | |||
v1, | |||
v2 | |||
) |
Returns the minimum angular separation in degrees between p and points on the great circle edge with plane normal n and vertices v1, v2. All inputs must be unit cartesian 3-vectors.
Definition at line 272 of file geometry.py.
def lsst.geom.geometry.minPhiEdgeSep | ( | p, | |
phi, | |||
minTheta, | |||
maxTheta | |||
) |
Returns the minimum angular separation in degrees between p and points on the small circle edge with constant latitude angle phi and vertices (minTheta, phi), (maxTheta, phi). p must be in spherical coordinates.
Definition at line 285 of file geometry.py.
def lsst.geom.geometry.minThetaEdgeSep | ( | p, | |
theta, | |||
minPhi, | |||
maxPhi | |||
) |
Returns the minimum angular separation in degrees between p and points on the great circle edge with constant longitude angle theta and vertices (theta, minPhi), (theta, maxPhi). p must be a unit cartesian 3-vector.
Definition at line 301 of file geometry.py.
def lsst.geom.geometry.normalize | ( | v | ) |
def lsst.geom.geometry.northEast | ( | v | ) |
Returns unit N,E basis vectors for a point v, which must be a cartesian 3-vector.
Definition at line 205 of file geometry.py.
def lsst.geom.geometry.reduceTheta | ( | theta | ) |
Range reduces the given longitude angle to lie in the range [0.0, 360.0).
Definition at line 194 of file geometry.py.
def lsst.geom.geometry.segments | ( | phiMin, | |
phiMax, | |||
width | |||
) |
Computes the number of segments to divide the given latitude angle range [phiMin, phiMax] (degrees) into. Two points within the range separated by at least one segment are guaranteed to have angular separation of at least width degrees.
Definition at line 339 of file geometry.py.
def lsst.geom.geometry.sphericalAngularSep | ( | p1, | |
p2 | |||
) |
Returns the angular separation in degrees between points p1 and p2, which must both be specified in spherical coordinates. The implementation uses the halversine distance formula.
Definition at line 169 of file geometry.py.
def lsst.geom.geometry.sphericalCoords | ( | args | ) |
Returns spherical coordinates in degrees for the input coordinates, which can be spherical or 3D cartesian. The 2 (spherical) or 3 (cartesian 3-vector) inputs can be passed either individually or as a tuple/list, and can be of any type convertible to a float.
Definition at line 108 of file geometry.py.
float lsst.geom.geometry.ANGLE_EPSILON = 0.001 * DEG_PER_ARCSEC |
Definition at line 37 of file geometry.py.
float lsst.geom.geometry.ARCSEC_PER_DEG = 3600.0 |
Definition at line 33 of file geometry.py.
float lsst.geom.geometry.COS_MAX = 1.0 - 1.0e-15 |
Definition at line 44 of file geometry.py.
int lsst.geom.geometry.CROSS_N2MIN = 2e-15 |
Definition at line 48 of file geometry.py.
float lsst.geom.geometry.DEG_PER_ARCSEC = 1.0 / 3600.0 |
Definition at line 34 of file geometry.py.
float lsst.geom.geometry.EPSILON = float_info.epsilon |
Definition at line 62 of file geometry.py.
lsst.geom.geometry.INF = float('inf') |
Definition at line 55 of file geometry.py.
lsst.geom.geometry.isinf = math.isinf |
Definition at line 71 of file geometry.py.
float lsst.geom.geometry.MAX_FLOAT = float_info.max |
Definition at line 60 of file geometry.py.
float lsst.geom.geometry.MIN_FLOAT = float_info.min |
Definition at line 61 of file geometry.py.
lsst.geom.geometry.NEG_INF = float('-inf') |
Definition at line 56 of file geometry.py.
float lsst.geom.geometry.POLE_EPSILON = 1.0 * DEG_PER_ARCSEC |
Definition at line 40 of file geometry.py.
lsst.geom.geometry.SIN_MIN = math.sqrt(CROSS_N2MIN) |
Definition at line 52 of file geometry.py.