WrightTools.data.Constant

class WrightTools.data.Constant(parent, expression, units=None, format_spec='0.3g', round_spec=None)[source]

Constant class.

__init__(parent, expression, units=None, format_spec='0.3g', round_spec=None)[source]

Data constant.

Parameters:
  • parent (WrightTools.Data) – Parent data object.

  • expression (string) – Constant expression.

  • units (string (optional)) – Constant units. Default is None.

  • format_spec (string (optional)) – Format string specification, as passed to format() Default is “0.3g”

  • round_spec (int or None (optional)) – Decimal digits to round to before formatting, as passed to round(). Default is None (no rounding).

Methods

__init__(parent, expression[, units, ...])

Data constant.

convert(destination_units, *[, ...])

Convert axis to destination_units.

max()

Axis max.

min()

Axis min.

Attributes

full

Axis expression evaluated and repeated to match the shape of the parent data object.

identity

Complete identifier written to disk in data.attrs['axes'].

label

A latex formatted label representing constant expression and united value.

masked

Axis expression evaluated, and masked with NaN shared from data channels.

natural_name

Valid python identifier representation of the expession.

ndim

Get number of dimensions.

points

Squeezed array.

shape

Shape.

size

Size.

std

The standard deviation of the constant.

units

units_kind

Units kind.

value

The value of the constant.

variables

Variables.