cap_distance¶
- pydl.pydlutils.mangle.cap_distance(x, cm, points)[source]¶
Compute the distance from a point to a cap, and also determine whether the point is inside or outside the cap.
- Parameters:
- x
ndarrayorrecarray Xvalue of the cap (3-vector).- cm
ndarrayorrecarray CMvalue of the cap.- points
ndarrayorrecarray If
pointsis a 3-vector, or set of 3-vectors, then assume the point is a Cartesian unit vector. Ifpointis a 2-vector or set of 2-vectors, assume the point is RA, Dec.
- x
- Returns:
ndarrayThe distance(s) to the point(s) in degrees. If the distance is negative, the point is outside the cap.