PyDL:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- pydl v1.0.1 »
- SDSS Utilities (`pydl.pydlutils`) »
- set_use_caps

# set_use_caps

pydl.pydlutils.mangle.set_use_caps(polygon, index_list, add=False, tol=1e-10, allow_doubles=False, allow_neg_doubles=False)

  Set the bits in use_caps for a polygon.

  Parameters:
    polygon `ManglePolygon`

      A polygon object.

    index_list array-like

      A list of indices of caps to set in the polygon. Should be no longer, nor contain indices greater than the number of caps (`polygon.ncaps`).

    add `bool`, optional

      If `True`, don’t initialize the use_caps value to zero, use the existing value associated with `polygon` instead.

    tol `float`, optional

      Tolerance used to determine whether two caps are identical.

    allow_doubles `bool`, optional

      Normally, this routine automatically sets use_caps such that no two caps with use_caps set are identical.

    allow_neg_doubles `bool`, optional

      Normally, two caps that are identical except for the sign of `cm` would be set unused. This inhibits that behaviour.

  Returns:
    `int`

      Value of use_caps.