openPMD-standard icon indicating copy to clipboard operation
openPMD-standard copied to clipboard

`dataOrder` is superfluous

Open ax3l opened this issue 9 years ago • 3 comments

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.

ax3l avatar Apr 26 '16 12:04 ax3l

Yes I think dataOrder should be removed or at least made optional.

DavidSagan avatar Feb 15 '18 15:02 DavidSagan

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.

anokfireball avatar Feb 17 '18 13:02 anokfireball

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.

ax3l avatar Feb 20 '18 08:02 ax3l

Resolved with #194

See also: https://github.com/openPMD/openPMD-standard/issues/235#issuecomment-2130075297

ax3l avatar May 24 '24 17:05 ax3l