pgkyl mask

Usage: pgkyl mask [OPTIONS]

  Mask out values using a mask dataset or numeric thresholds.

  Returns a dataset whose values are a ``numpy.ma`` masked array. Exactly one of the
  masking modes is applied, with ``mask_data`` taking precedence:

  - ``mask_data``: mask cells where the mask dataset's field is negative,   repeated
  across ``data``'s components. Load the mask field yourself   (e.g.
  ``pg.load(mask_path)``) -- this verb takes data, never a file path   (``operations``
  never touches ``io``). - ``lower`` and ``upper``: mask values outside the closed range
  ``[lower, upper]``. - ``lower`` only: mask values below ``lower``. - ``upper`` only:
  mask values above ``upper``.

Options:
  -m, --mask_data TEXT     an already-loaded dataset whose field selects the mask
                           (negative -> masked); it must have exactly one component --
                           the mask is broadcast across every component of ``data`` via
                           ``np.repeat(mask_data.values, data.num_comps, axis=-1)``,
                           which only produces a shape matching ``data.values`` when
                           ``mask_data`` is single-component. A multi-component
                           ``mask_data`` raises from the subsequent
                           ``np.ma.masked_where`` broadcast, not from an explicit check
                           here.
  -l, --lower FLOAT        lower threshold. Combined with ``upper`` masks outside the
                           range; alone masks values below it.
  -u, --upper FLOAT        upper threshold. Combined with ``lower`` masks outside the
                           range; alone masks values above it.
  -i, --inplace [BOOLEAN]  mutate and return ``data`` instead of a new dataset.
                           [default: False]
  -t, --tag TEXT           optional tag for the returned dataset.
  --label TEXT             optional label for the returned dataset.
  --help                   Show this message and exit.

Python API