prjemian / punx

Python Utilities for NeXus HDF5 files
https://prjemian.github.io/punx
5 stars 7 forks source link

check if unknown names are allowed to be flexible #16

Open prjemian opened 8 years ago

prjemian commented 8 years ago

in validate.review_with_NXDL(), check if an otherwise unrecognized field or group name (not known to NXDL class) can fit some specification of the NXDL

prjemian commented 3 years ago

@carterbox: This could be complicated so some discussion before starting would be helpful. The unit tests could use any/all of the example data files (in ./punx/data).

Unknown names can occur in at least two ways in NeXus data files:

  1. groups or fields with name chosen arbitrarily by the writer
  2. groups or fields where the name was intended to be flexible (usually rendered in upper case in the web page documentation)
prjemian commented 2 years ago

In the NXDL files, flexible names are indicated as all upper case. This is a fairly recent NeXus decision so uniform adoption may not be consistent.

The challenge here is to decide about any unexpected name, how might it match into the current context.

prjemian commented 2 years ago

NeXus issues/PRs:

prjemian commented 2 years ago

One easy case is with NXdata, if only one dataset is present, then whatever its name, that will be the default dataset to be plotted. (This is exactly the default structure of the EPICS area detector HDF5 plugin.) That is just one of many cases to be found.

prjemian commented 2 years ago

https://manual.nexusformat.org/datarules.html#naming-conventions

reserved prefix and suffixes