Weighted#

class uvex_transients.phase_space.sampling.base.Weighted(name: str, weight: Callable[[NDArray], ArrayLike], label: str = '', unit: str = '', draw: bool = True)[source]#

The success fraction times a quantity of the point, with its interval.

A recovered volume-time is the success fraction times the volume-time of the survey for an event there, and an efficiency is the fraction times the coverage. The interval of the fraction carries through, since the weight is positive.

Parameters:
  • name (str) – The name of the product. Its columns are name, <name>_lo and <name>_hi.

  • weight (callable) – weight(x) takes points of shape (..., ndim) and returns the weight, of shape (...), which must not be negative.

  • label (str, optional) – As for Product.

  • unit (str, optional) – As for Product.

  • draw (bool, optional) – As for Product, but on by default: a quantity with an interval is what a figure of the map shows.

Methods

Attributes

draw

Whether the default figure has a panel for the quantity.

name

The name of the product, and of its main column.

label

What a figure calls the quantity.

unit

The unit of the quantity.