nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 56 forks source link

accepting multiple AppDef interfaces for /NXentry/definition #1443

Open sanbrock opened 2 months ago

prjemian commented 2 months ago

Please elaborate why each application definition cannot be reported within its own NXsubentry, under a common NXentry.

benajamin commented 2 months ago

What is the difference between this and NXsubentry?

benajamin commented 2 months ago

@sanbrock wants multiple interface inheritance in order to implement multiple application definitions in the same NXentry. The problem is how to resolve conflicts where an object is defined differently in more than one application definition.

phyy-nx commented 2 months ago

Here's an example that needs to be resolved. Imagine two files:

File 1: /entry/instrument/title = "NXem instrument alpha"

File 2: /entry/instrument/title = "NXxas instrument beta"

What does the combined file look like? There will only be one instrument group if multiple inheritance is used. So what is /entry/instrument/title? And conceptually does this mean there is only one instrument that is combo NXem + NXxas?

With subentry it looks like this: /entry/subentry1/instrument/title = "NXem instrument alpha" /entry/subentry2/instrument/title = "NXxas instrument beta"

sanbrock commented 2 months ago

It would probably be enough for now if it is clear in the documentation that /ENTRY/SUBENTRY can host data for arbitrary AppDef and not only multi-modal experiment parts.

benajamin commented 2 months ago

I agree that NXsubentry can be used for hosting arbitrary application definitions. There are no requirements. NXsubentry was created to give further possibilities for combining multiple application definitions in a single file. How someone chooses to split their data between multiple files, or multiple NXentrys or multiple NXsubentries is not meant to be enforced. We just provide advice on the usage that we think is probably more appropriate.

phyy-nx commented 2 months ago

Quote from NXsubentry: "Group of multiple application definitions for “multi-modal” (e.g. SAXS/WAXS) measurements." So that could be clarified.