nexusformat / NIAC

Issue for the NIAC to discuss (no code)
2 stars 0 forks source link

can an application definition define multiple entries? #126

Closed prjemian closed 2 years ago

prjemian commented 2 years ago

No. An application definition is a group under NXentry or a peer.

prjemian commented 2 years ago

How can an NXDL describe multiple NXentry groups in a data file?

So far, NeXus does not address this.

prjemian commented 2 years ago

Here's an example NeXus/HDF5 file that has such data: https://github.com/prjemian/punx/tree/main/punx/data/cs_af1410.h5

Multiple NXentry groups (different sample ageing times) with multiple NXdata groups (horizontal and vertical slices from area detector raw data).

prjemian commented 2 years ago

What coordinates these multiple NXentry groups is the samples have the same composition (in fact, they were cut apart from the same starting material, a block of AF1410 steel).

benajamin commented 2 years ago

The consensus seems to be that it is not technically possible for an application definition to state any requirements about the use of NXentry groups to structure the data. However, you can advise the community to structure data using NXentry groups. For NXstxm, I published an article that stated the following:

NeXus provides NXentry as a way of allowing multiple measurements in the one file, if there is some reason for grouping them together. A set of measurements that are made in parallel or form a consecutive set, for example, could be written into separate NXentrys within the same HDF5 file. Pixelator, and other STXM control programs, allow a user to measure multiple spatial regions in parallel such that the instrument will execute scans of each regions in sequence using the first photon energy before repeating the same set of spatial regions using the next photon energy and so on for each requested photon energy. In this case, a conforming NXstxm file will contain one NXentry group for each spatial region such that the contents of each NXentry group is identical to the case where that spatial region alone had been scanned. The example given in Fig. 1 scans a single spatial region and so contains a single NXentry group named ‘entry1’.

benajamin commented 2 years ago

The use of NXentry for storing multiple measurements in a single file is mentioned in the manual in the Using an Application Definition section. I think this might be an appropriate place to explicitly state that application definitions have no power to enforce usage of NXentry.