FAIRmat-NFDI / nexus_definitions

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

Document proper use of link and target #171

Open lukaspie opened 4 months ago

lukaspie commented 4 months ago

It should be clarified in the NeXus documentation how link and target shall be used in NeXus (this should be done together with or directly by NIAC).

How it should work:

From the (NeXus docs)[https://manual.nexusformat.org/design.html#links], it is specified that the target of links in app defs shall be class paths, but this is well-documented and (to my knowledge) not really used properly anywhere.

The idea is: if I have an application definition called NXmy_app_def containing a wavelength in its NXinstrument, which I want to reference somewehere else in the app def in an NXprocess, it should be done like this:

NXmy_app_def(NXobject):
  (NXentry):
    (NXinstrument):
      crystal(NXmonochromator):
        wavelength(NX_NUMBER):
    [...]
    my_process(NXprocess):
     link_field(link):
       target: /NXmy_app_def/ENTRY/INSTRUMENT/crystal/wavelength