selection#

class qtypy.selection.cut(expr)[source]#

Represents a floating-point weight applied to a row, considered only when a cut is passed.

A weight evaluates a numerical expression for each row representing its statistical significance. Weights compound by multiplication onto existing preselection(s).

Parameters:
  • expr (str) – A boolean expression to evaluate on the dataset rows.

  • preselection (str, optional) – Name of a prior selection to use as the base for this cut.

class qtypy.selection.weight(expr)[source]#

Represents a floating-point weight applied to a row, considered only when a cut is passed.

A weight evaluates a numerical expression for each row representing its statistical significance. Weights compound by multiplication onto existing preselection(s).

Parameters:
  • expr (str) – An expression returning a floating-point value for each row.

  • preselection (str, optional) – Name of a prior selection (cut) to restrict the weight application.