uvex_transients.surveys.footprints.base.combine_MOC#

uvex_transients.surveys.footprints.base.combine_MOC(*, max_order: int, operation: str, operands: Sequence[str], operand_keys: Sequence[str] = ()) → MOC[source]#

Registry-contract generator that combines the MOCs of registered footprints.

Parameters:
  • max_order (int) – Maximum order of the result. Operands finer than this are degraded first.

  • operation ({"union", "intersection", "difference", "xor"}) – How to fold the operands together, left to right. For "difference" that is the first operand minus each later one. Aliases "or", "and", "minus" and "symmetric_difference" are accepted.

  • operands (sequence of str) – Full names of footprints in default_registry.

  • operand_keys (sequence of str, optional) – Unused; the operands’ cache keys, carried in the params so the combined cache key changes whenever an operand does.

Returns:

The combined MOC.

Return type:

mocpy.MOC

Raises:
  • ValueError – If operation is unknown or operands is empty.

  • KeyError – If an operand is not registered.