is_in_polygon¶
-
pydl.pydlutils.mangle.is_in_polygon(polygon, points, ncaps=0)[source]¶ Are the points in a given (single) polygon?
Parameters: polygon :
ManglePolygonA polygon object.
points :
ndarrayorrecarrayIf
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.ncaps :
int, optionalIf set, use only the first
ncapscaps inpolygon.Returns: ndarrayA boolean vector giving the result for each point.