Data#
- class nextnanopy.utils.datasets.Data(name, value, unit=None, metadata=None, label_fmt=None, *args, **kwargs)#
Bases:
objectBase class for the datasets nextnanopy reads out of nextnano files:
VariableandCoordfrom data files,InputVariablefrom input files.Named value with a unit, a label and free-form metadata.
- Parameters:
- namestr
Name of the dataset.
- valuenot defined
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.
- valuenot defined
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})'.