openPMD-standard
openPMD-standard copied to clipboard
`dataOrder` is superfluous
By defining things like axisLabel are ordered by fastest to slowest varying index one can probably omit dataOrder.
needs a bit more evaluation but should be true.
Yes I think dataOrder should be removed or at least made optional.
After developing two readers/writers that deal with openPMD data and having read the standard numerous times, dataOrder and axisLabels are two attributes I always have to look up.
I presume dataOrder was introduced to handle file formats that do not explicitly store which dimensions are fastest. Considering the major formats:
- HDF5 stores row-major only (their Fortran wrapper transposes accordingly)
- ADIOS stores the native order, offers functionality to determine the order, does not transpose out of the box
- NetCDF stores row-major only (their Fortran wrapper transposes accordingly)
- SDF stores row-major only (xyz)
- VTK stores row-major only (tensors)
... makes the order implicit in most formats and detectable in the remaining one.
I propose to make dataOrder optional in 2.0. axisLabels should reflect the natural order, depending on the order in the file. If a file format supports both orders, but does not allow to query the order, dataOrder should be supplied.
Also, the description of axisLabels in the standard should explicitly state whether the order is from slowest to fastest or from fastest to slowest.
Excellent, I will put you both on the review of that change then.
I would actually remove dataOrder completely and describe attributes such as axisLabel more precisely. Making it optional will not lift the confusion.
Resolved with #194
See also: https://github.com/openPMD/openPMD-standard/issues/235#issuecomment-2130075297