PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v0.6.0 »
- PyDL »
- SDSS Utilities (`pydl.pydlutils`) »
- is_in_polygon

# is_in_polygon

`pydl.pydlutils.mangle.``is_in_polygon`(polygon, points, ncaps=0)

  Are the points in a given (single) polygon?

  Parameters:

  polygon : `ManglePolygon`

  > A polygon object.

  points : `ndarray` or `recarray`

  > If `points` is a 3-vector, or set of 3-vectors, then assume the point is a Cartesian unit vector. If `point` is a 2-vector or set of 2-vectors, assume the point is RA, Dec.

  ncaps : `int`, optional

  > If set, use only the first `ncaps` caps in `polygon`.

  Returns:

  `ndarray`

  > A boolean vector giving the result for each point.