spectrochempy.NDDataset.from_xarray
- classmethod NDDataset.from_xarray(dataset)[source]
Build a minimal
NDDatasetinstance from anxarray.Dataset.This prototype covers numerical data, default coordinates, auxiliary same-dimension coordinates, units, masks, JSON-compatible metadata, title, name, description, author, origin, created, modified, acquisition_date, and portable string labels.
Auxiliary coordinates are detected by
scpy_coord_roleandscpy_owner_dimattributes and reassembled into a same-dimensionCoordSetwith the dimension coordinate as the default.Portable string labels are restored from non-dimension coordinates with
scpy_coord_role="label"and associated with the owning dimension’s coordinate viascpy_owner_dim.Rich CoordSet semantics and backend-specific persistence are intentionally out of scope here.