[Nexus] Correct way to specify multiple signals
V. Armando Solé
sole at esrf.fr
Fri Jan 12 09:16:53 GMT 2018
On 12/01/2018 09:55, Jacob.Filik at Diamond.ac.uk wrote:
> Dear Armando, All,
> Thank you for the extra clarification, I will check with the others, but I believe this is functionality Diamond would be interested in.
> I believe there is still merit in having discussion on the implementation.
> As I see it:
> Pete suggested auxiliary_signals which effectively gives back the signal =1, signal = 2 feature, I'm sure someone more experienced in NeXus can explain why this was not included in the 2014 tagging, I assume it was just simplicity.
> To me the addition of auxiliary_axes is a new feature
It is. It came out in the discussion as an additional possibility. What
I intended to get when I posted to the mailing list was to recover the
signal=1, signal=2 use that, by the way, as far as I know *never* was
official although a lot of people were using it.
> , which is convenient and useful, not all data on one plot needs the same axes, but thinking on this addition this now appears equivalent to making another NXdata inside the primary NXdata, but without any encapsulation and requiring new logic to correctly interpret an NXData group.
> I would suggest instead of auxiliary_signals and auxiliary_axes NXdata groups should contain explicit NXdata groups for all the auxiliary datasets. We all have code that parses the NXdata structure, the addition if (nxdata contains nxdata) branch feels more simple that auxiliary_signal parsing.
> I'm not sure but I think and NXdata in and NXdata is fine, so the only addition I would suggests this needs to the standard is to explicitly state "placing an NXdata inside another NXdata signifies they can be plotted on the same plot".
I can see advantages and disadvantages in your approach:
- Advantage: each new signal can have its own uncertainties and so on
- Disadvantages: potential conflicting information (for instance labels)
but mainly that I find it more cumbersome to implement.
For instance, having auxiliary_signals would allow the simple multiple
signals sharing the same axes (recovering unofficial signal=1, signal=2,
Honestly that would satisfy my original request and I would be happy
since it solves the common cases.
Having auxiliary_signals (not auxiliary_axes) would be enough for me.
How to deal with plots with signals having different number of
points/pixels would then remain a discussion subject that it would require:
- To agree on the need or not
- To decide how to implement it
More information about the NeXus