nexusformat / definitions

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

NXdata - @signal doc confusing #1209

Closed woutdenolf closed 1 year ago

woutdenolf commented 1 year ago

https://github.com/nexusformat/definitions/blob/6015a47a1afe792926c4c011f3a089d4e110bb8a/base_classes/NXdata.nxdl.xml#L65-L74

  1. So the sentence The value names an existing child of this group. means that The value is equal to the name of field which is the direct child of this group.? (The fact that this child must exist is clear enough imo)
  2. This also applies to @auxiliary_signals and @axes?
  3. What does The child group must itself be a NeXus group mean?

I'm asking because some people interpret the docs as allowing @signal to contain a relative path to a field. We had an h5web bug report because of it. As far as I understand, this is not allowed:

data:NXdata
  @signal = "mygroup/mydata"
  mygroup
    mydata: float[100]

I suspect The child group must itself be a NeXus group may cause the confusion.

woutdenolf commented 1 year ago

It seems The child group must itself be a NeXus group was introduced a few months ago: https://github.com/nexusformat/definitions/pull/1022/files

@prjemian this seems like a copy&paste error right?

PeterC-DLS commented 1 year ago

It seems The child group must itself be a NeXus group was introduced a few months ago: https://github.com/nexusformat/definitions/pull/1022/files

This was https://github.com/nexusformat/definitions/pull/1022/commits/4c5d50e1ff1295c542e02e933a24be40042fd88c and replaced:

A field of this name must exist (either as a NeXus field or as a link to a NeXus field). The value must match the :ref:regular expression pattern for NXDL group and field names <validItemName>.

PeterC-DLS commented 1 year ago

So I suggest you need to mention a link to a field is permitted and that field must be (why?) in a NeXus group.

woutdenolf commented 1 year ago

Indeed I don't see why the link destination should be inside a NeXus group. It would prevent the use of external data for no good reason.

prjemian commented 1 year ago

Good point. I authored that phrase and now see why it is not a requirement. Remove it.