pyobs_weather.weather.evaluators.Switch

class Switch(threshold: float, invert: bool = False)[source]

A simple Switch that changes its value whenever a given threshold is reached.

Creates a new Switch.

The switch evaluates to True (False, if invert is True), if its value is smaller than the given threshold.

Parameters:
  • threshold – Threshold for switch.

  • invert – If True, invert result of evaluation.

__call__(sensor)[source]

Evaluates this evaluator.

Parameters:

sensor – Sensor to evaluate.

Returns:

Result of evaluation.

areas() list[source]

Returns list of areas for plot.