skymask

pydl.pydlspec2d.spec1d.skymask(invvar, andmask, ormask=None, ngrow=2)[source]

Mask regions where sky-subtraction errors are expected to dominate.

Parameters
invvarnumpy.ndarray

Inverse variance.

andmasknumpy.ndarray

An “and” mask. For historical reasons, this input is ignored.

ormasknumpy.ndarray, optional

An “or” mask. Although technically this is optional, if it is not supplied, this function will have no effect.

ngrowint, optional

Expand bad areas by this number of pixels.

Returns
numpy.ndarray

The invvar multiplied by the bad areas.