qmi.data.dataset.convert_to_qmi_dataset
- qmi.data.dataset.convert_to_qmi_dataset(parent: File | File | Group | Group | Dataset | Variable) DataSet
A function to convert a HDF5 dataset, in a group, or in file root, to a QMI dataset.
If the input is a h5py.Dataset | h5netcdf.Variable, the dataset can have one or more dimensions.
If the input is s h5py.Group | h5netcdf.Group, and the group has multiple datasets, the dataset attributes are looked into if we can determine a scaled axis | column or columns, and data axis | axes. If so, it will be converted into single QMI dataset with (multiple) ax[i|e]s and column[s]. A single dataset will be converted as a 1D dataset.
If the input is a h5py.File | h5netcdf.File, and there are no groups, the handling is the same as for the group. If there is a single group present, that will be taken and handled like a group. For multiple groups in a file an error will be thrown.