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

Bases: WrightTools.data._axis.Axis

Constant class.

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

Data constant.

  • 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).


convert(destination_units, *[, …]) Convert axis to destination_units.
max() Axis max.
min() Axis min.


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_kind Units kind.
value The value of the constant.
variables Variables.