PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v1.0.0-rc2 »
- SDSS Utilities (`pydl.pydlutils`) »
- is_in_window

# is_in_window

pydl.pydlutils.mangle.is_in_window(polygons, points, ncaps=0)

  Check to see if `points` lie within a set of `polygons`.

  Parameters
    polygons `PolygonList` or `FITS_polygon`

      A set of polygons.

    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`. This only exists to be passed to `is_in_polygon()`.

  Returns
    `tuple`

      A tuple containing two `ndarray`. First, a boolean vector giving the result for each point. Second, an integer vector giving the index of the polygon that contains the point.