From e3cbed710215dde0650a2d8806abbba116d288ed Mon Sep 17 00:00:00 2001 From: Aaron Brewster Date: Mon, 19 Jun 2023 11:12:09 -0700 Subject: [PATCH 1/3] Fixes for NXsubentry example - Add NXsample links in SAS:NXsubentry and Fluo:NXsubentry - SAS:NXsubentry/instrument/detector should point to entry/instrument/SASdet (which means don't need explicit link to entry/instrument/SASdet/data in SAS:NXsubentry/instrument/detector) - The detector links in Fluo:NXsubentry should point to the detectors in entry/instrument, not to the data within them (follow pattern of SAS:NXsubentry) --- manual/source/examples/hierarchy-subentry.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/manual/source/examples/hierarchy-subentry.txt b/manual/source/examples/hierarchy-subentry.txt index a963678c47..2b53c3ea71 100644 --- a/manual/source/examples/hierarchy-subentry.txt +++ b/manual/source/examples/hierarchy-subentry.txt @@ -12,17 +12,18 @@ SAS:NXsubentry definition = "NXsas" instrument:NXinstrument - detector:NXdetector - data --> /entry/instrument/SASdet/data + detector -> entry/instrument/SASdet data:NXdata data --> /entry/instrument/SASdet/data + sample --> /entry/sample Fluo:NXsubentry definition = "NXfluo" instrument:NXinstrument - detector --> /entry/instrument/fluordet/data - detector2 --> /entry/instrument/large_area/data + detector --> /entry/instrument/fluordet + detector2 --> /entry/instrument/large_area data:NXdata @signal = detector @axes = [".", "."] detector --> /entry/instrument/fluordet/data + sample --> /entry/sample data:NXdata --> /entry/Fluo/data From 056dc994cb984c821068df60f3e745bfaf49c5fe Mon Sep 17 00:00:00 2001 From: Aaron Brewster Date: Mon, 19 Jun 2023 11:23:55 -0700 Subject: [PATCH 2/3] Add link to NXsubentry example --- base_classes/NXsubentry.nxdl.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base_classes/NXsubentry.nxdl.xml b/base_classes/NXsubentry.nxdl.xml index 5f45a76da3..8b57e6d9f1 100644 --- a/base_classes/NXsubentry.nxdl.xml +++ b/base_classes/NXsubentry.nxdl.xml @@ -73,6 +73,8 @@ multiple techniques for data collection (such as SAXS/WAXS instruments), it was recognized the application definitions must be entered in the NeXus data file tree as children of :ref:`NXentry`. + + See rules for :ref:`NXsubentry or Multi-Method Data <rules-subentry>` From 798a1201aba63edef0659422d084653eef4a0e1d Mon Sep 17 00:00:00 2001 From: Aaron Brewster Date: Mon, 19 Jun 2023 15:06:00 -0700 Subject: [PATCH 3/3] Further address NXsubentry questions --- base_classes/NXsubentry.nxdl.xml | 43 ++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/base_classes/NXsubentry.nxdl.xml b/base_classes/NXsubentry.nxdl.xml index 8b57e6d9f1..3399bc54e5 100644 --- a/base_classes/NXsubentry.nxdl.xml +++ b/base_classes/NXsubentry.nxdl.xml @@ -52,29 +52,40 @@ - Group of multiple application definitions for "multi-modal" (e.g. SAXS/WAXS) measurements. + Group to enable the combination of multiple application definitions for "multi-modal" + measurements (e.g. multi-technique methods like SAXS/WAXS). ``NXsubentry`` is a base class virtually identical to :ref:`NXentry` and is used as the (overlay) location for application definitions. - Use a separate ``NXsubentry`` for each application definition. + Use a separate ``NXsubentry`` for each application definition. + + To illustrate, consider the normal way to define a NeXus file:: + + NXentry + definition = name of application definition + # all the structure of the application definition + # Note, no use of NXsubentry + + With NXsubentry, one can combine application definitions within a single NXentry:: - To use ``NXsubentry`` with a hypothetical application definition - called ``NXmyappdef``: + NXentry + # no definition field required here + NXsubentry + definition = name of application definition + # all the structure of the application definition + NXsubentry + definition = name of a second application definition + # all the structure of the second application definition - * Create a group with attribute ``NX_class="NXsubentry"`` - * Within that group, create a field called ``definition="NXmyappdef"``. - * There are two optional attributes of definition: ``version`` and ``URL`` + Notes: - The intended use is to define application definitions for a - multi-modal (a.k.a. multi-technique) :ref:`NXentry`. - Previously, an application definition - replaced :ref:`NXentry` with its own definition. - With the increasing popularity of instruments combining - multiple techniques for data collection (such as SAXS/WAXS instruments), - it was recognized the application definitions must be entered in the NeXus - data file tree as children of :ref:`NXentry`. + * There are two optional attributes of definition: ``version`` and ``URL`` + * Groups like NXinstrument can be included outside of NXsubentry under NXentry + allowing them to be cited in mulitple NXsubentries + * An NXsubentry should not contain another NXsubentry - See rules for :ref:`NXsubentry or Multi-Method Data <rules-subentry>` + See rules for :ref:`NXsubentry or Multi-Method Data <rules-subentry>` for a + more in depth example.