Variable#
- class nextnanopy.utils.datasets.Variable(name, value, unit=None, metadata=None, **kwargs)#
Bases:
DataDependent variable read from a nextnano data file.
Holds the quantity itself; the axes it is sampled on are
Coordobjects.- Parameters:
- namestr
Name of the dataset.
- valuearray_like
Stored value.
- unitstr, default=None
Unit of the value.
- metadatadict, default=None
Extra information.
- label_fmtcallable, default=None
Called as
label_fmt(name, unit)to buildlabel. If not defined, the two are joined as'{name} ({unit})'.
- Attributes:
- namestr
Name of the dataset.
- valuenumpy.ndarray
Stored value.
- unitstr
Unit of the value.
- metadatadict
Extra information. Empty unless the loader filled it in.
- labelstr
Name and unit rendered by
label_fmt, ready to use as an axis label. Read-only.- label_fmtcallable
Called as
label_fmt(name, unit)to buildlabel. If omitted, the two are joined as'{name} ({unit})'.
- get_value()#
Return a copy of the value.