nexusformat / definitions

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

Clarify use of non-NeXus terms #1335

Open g-guenther opened 7 months ago

g-guenther commented 7 months ago

What about terms that are not covered by NeXus, e.g. some motor parameter connected to a detector or a pressure value related to a neutron guide. I guess, I may add as many terms as I like anywhere in the NeXus file (if they do not use predefined NeXus terms), even outside dedicated groups such as NXcollection or NXparameters. However, I can't find a corresponding comment in the documentation. Sentences like "The base classes represent a set of components that define the dictionary of all possible terms to be used with that component" (ref) suggest the opposite.

To be clear: Would NeXus allow to add not predefined terms to existing base classes? For example:

entry:NXentry
    ...
    instrument:NXinstrument
        ...
        neutron_guide:NXguide
            ...
            pressure_valve_1:NX_FLOAT = 0.1
                @units="mbar"

If so, I would expect a promient comment e.g. in the NeXus Design section. Have I overlooked a corresponding comment?

prjemian commented 7 months ago

Yes, you can add fields of your choosing. Do not use existing fields (as defined in that group) for different purposes. I agree this should be stated clearly. This could be a FAQ. There are some naming rules to follow. To ensure longevity, make the names such that they are not likely to be added to the standard in the future, unless that is your intention. Some instruments apply a prefix (such as "usaxs_") to avoid any future changes in the standard.

On Wed, Dec 6, 2023, 8:57 AM g-guenther @.***> wrote:

What about terms that are not covered by NeXus, e.g. some motor parameter connected to a detector or a pressure value related to a neutron guide. I guess, I may add as many terms as I like anywhere in the NeXus file (if they do not use predefined NeXus terms), even outside dedicated groups such as NXcollection or NXparameters. However, I can't find a corresponding comment in the documentation. Sentences like "The base classes represent a set of components that define the dictionary of all possible terms to be used with that component" (ref https://manual.nexusformat.org/introduction.html) suggest the opposite.

To be clear: Would NeXus allow to add not predefined terms to existing base classes? For example:

entry:NXentry ... instrument:NXinstrument ... neutron_guide:NXguide ... pressure_valve_1:NX_FLOAT = 0.1 @units="mbar"

If so, I would expect a promient comment e.g. in the NeXus Design https://manual.nexusformat.org/design.html section. Have I overlooked a corresponding comment?

— Reply to this email directly, view it on GitHub https://github.com/nexusformat/definitions/issues/1335, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMUMA6SRKLMJN5WZHHOATYICBV3AVCNFSM6AAAAABAJQPVP2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZDQNZUGY2DAOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

prjemian commented 7 months ago

Another place to mention about adding non-defined fields is on the NeXus Class Definitions page.