Closed SimonHeybrock closed 11 months ago
There is a conceptual problem: What is a Field
exactly? Does it contain errors or is it simply a HDF5 dataset? In the former case, the current interface of returning a H5Dataset
from create_field
and co. no longer works. In the latter, it create_field
cannot save variances.
If we go with the latter, we could check for variances in create_field
and raise if there are any. But this would mean that users would always have to extract the values: create_field(data=sc.values(var), ...)
For reading, we treat a field as the combination of the value and error datasets. We should do the same for writing.
the current interface of returning a H5Dataset from create_field and co. no longer works
We could return the value dataset only? Or a tuple? I think the utility of the return value is mainly to be able to set additional attributes. In NeXus this is mostly (or even exclusively?) defined for the values dataset. Therefore I think we would be fine by simply returning that.
Check the code, and add a test.