Unit#

class pypillometry.Unit(name, dimension, factor)[source]#

Bases: object

A unit of time, length or angle.

Multiplying a number, tuple, list or array by a unit gives a Quantity. Units are available in the u namespace.

Parameters:
  • name (str) – canonical name of the unit (e.g., “ms”, “sec”, “mm”, “deg”)

  • dimension (str) – one of “time”, “length”, “angle”

  • factor (float or None) – size of the unit in the base unit of its dimension (ms, mm or radians); None for “samples”, whose size depends on the sampling rate

Details