Obstype#

The Obstype class represents an observation type, including its standard unit and description. It is used throughout the toolkit to define the nature and units of observational data.

A regular user typically interacts with Obstype instances via higher-level classes such as Dataset or Station, but direct use is possible for advanced customization.

Constructor#

Obstype(name, std_unit, description)

Class representing an observation type with standard unit and description.

Attributes#

A summary of all the attributes (and properties) of the Obstype class.

Obstype.name

Return the name of the observation type.

Obstype.std_unit

Return the standard unit as string.

Obstype.description

Return the description of the observation type.

Obstype.original_name

Return the original name of the observation type.

Obstype.original_unit

Return the original unit as string.

Methods#

A summary of all methods in the Obstype class.

Obstype.get_compatible_units()

Get all units compatible with the standard unit.

Obstype.is_compatible_with(other)

Test if the other Obstype is compatible with this one.

Obstype.get_info([printout])

Print or return detailed information of the observation type.

Obstype.convert_to_standard_units(...)

Convert input data to the standard unit.

Special methods#

The Obstype class implements several Python special methods for convenience:

  • __add__: Combine two Obstypes objects, by joing the string-attributes.

  • __eq__: Test equality between two obstype objects (by name, std_unit and description).

  • __str__ and __repr__: String representations for printing and debugging.