[NeXus-committee] NeXus Ontology v2.0 brings questions for clarification
Sandor Brockhauser
sandor.brockhauser at physik.hu-berlin.de
Tue Dec 20 10:03:52 GMT 2022
Dear All,
While working on the NeXus Ontology v2.0, we have found a few interesting cases in the current definitions which we may want to go through (e.g. on the next meeting) and clarify/discuss if needed:
+ Same names for different type of children of the same(?) concept (Definition/Group/Field)
NXentry/thumbnail/type-attribute is defined in NXentry, but NXentry/thumbnail-group is referencing NXnote where NXnote/type-field is already defined (for the same purpose). Note that a machine can easily distinguish between them and the NeXus Vocabulary is already prepared for handling such cases by using a clarification postfix (as above), but are they intentionally implement two separated concepts under the same name?
Should it be really supported?
Similar, but intentional:
NXentry/SAMPLE/sample_histrory-group may be defined as NXnote for a generic use, but NXellipsometry/ENTRY/SAMPLE/sample_hisotry-filed may be defined as NX_CHAR for simplicity.
Is it OK?
Note another intentional, but controversial use case: The NeXus convention on scanning says that a Field of an NX_NUMBER dataset can be replaced by an NXlog Group with the same name if the values supposed to be stored with timestamps. What happens if this group name is already defined as another concept, so the application of a generic concept leads to a contradiction?
+ regexp enumerations
NXentry/thumbnail/type-attribute is defined with the “Obligatory value: image/*”. Does it mean that it always has to be literaly "image/*” or it only means that its actual value shall start with "image/“?
Is it really an enumeration?
Shall we enable a regexp as enumeration?
+ number enumerations
In some case enumeration refers to numbers (e.g. NXguide/reflectivity/[surface,wavelength]_indices), but because of enumeration, their data type had to be forced to be NX_CHAR. Although they are now overriding the data type of the referenced(?) concept NXdata/AXISNAME_indices-attribute which is defined as NX_INT.
Note that NXdetector/time_of_flight/axis-attribute (with enumeration value of “3”) is defined as NX_POSINT.
Shall it be the way to go and allow enumeration for other data types, too, although their string value is given in the nxdl definition?
+ default unit category
In some cases our definitions do not specify a unit category (e.g. NXdetector/detector_number-field of NX_INT, NXdetector/bit_depth_readout-field of NX_INT, or even NXcapillary/focal_size-field of NX_FLOAT).
If it is only for convenience, Is there a fallback solution of a default value, like NX_ANY or NX_UNITLESS? The later does apply neither to NXdetector/bit_depth_readout-field, nor to NXcapillary/focal_size-field.
Or if the given concept (Group/Field/Attribute) is referring to another one (e.g. from a base class as NXmonopd/MONITOR/preset of NX_FLOAT referring to the same(?) concept NXmonitor/preset of NX_NUMBER units=NX_ANY) shall it receive a default unit category, or shall it simply inherit the already defined unit category from the referred concept?
+ complex unit categories
NeXus has already complex unit categories, like NX_MASS_DENSITY, NX_MOLECULAR_WEIGHT, NX_PER_AREA, NX_PER_LENGTH, NX_WAVENUMBER, etc. but others can also be derived using the Unidata’s Udunits convention (see also https://www.unidata.ucar.edu/software/udunits/udunits-2.2.28/udunits2.html <https://www.unidata.ucar.edu/software/udunits/udunits-2.2.28/udunits2.html>).
Is there a way to refer to such units or unit categories?
Is it planed to introduce NX_UDUNITS as unit category, so one can use derived unints according?
Or is it possible to supply a Udunits derivation as a unit category(!) (e.g. units="m/s"), so any compatible units, like "km/h” could be used?
+ units= vs. units=
As an xml tag, units= is used by NXDL to specify unit categories for Fields. units= on the other hand can be used by application definitions to specify enumeration for the dataset attribute @units which specify the actual unit of the data.
It is at least confusing in NeXus that both a unit category specification and a specific unit in a data file use the same plural form “units”.
Was it ever discussed?
Should not it be made clear: “units” for unit categories, and “unit” for the actual unit?
Bests,
Sandor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.nexusformat.org/pipermail/nexus-committee/attachments/20221220/d7acc136/attachment.htm>
More information about the NeXus-committee
mailing list