Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider loading source from NXmoderator #98

Open
jl-wynen opened this issue Sep 19, 2024 · 6 comments
Open

Consider loading source from NXmoderator #98

jl-wynen opened this issue Sep 19, 2024 · 6 comments

Comments

@jl-wynen
Copy link
Member

The NeXus workflow loads source information from an NXsource group. The current BIFROST files (both written by Greg and CODA) don't contain such a group but use NXmoderator instead.

A moderator group contains different data than a source group. But it does have a position which is all we need in our current workflow. So we may want a way to use a moderator instead of a source.

@jl-wynen
Copy link
Member Author

@g5t
Copy link

g5t commented Nov 18, 2024

I'm willing to accept different opinions, but my current viewpoint is influenced by the NeXus Format base class descriptions

  • NXsource, "The neutron or x-ray storage ring/facility"
  • NXmoderator, "A neutron moderator"

I interpret this, as well as the list of optional group fields for each, to suggest that the two groups contain different types of information for spallation neutron sources

  • NXsource contains information about the proton accelerator and (possibly) target
  • NXmoderator contains information about the component which moderates high-energy neutrons to useful energies

The position of the accelerator and target are irrelevant for neutron instruments, since it is the moderator which defines the distribution of neutrons available to the instrument.

The NXmoderator group is the best available base group to use for the position of the neutron origin, but leaves a bit to be desired since the physical moderator and the 'viewed' origin do not need to coincide.

Until such time as an NXneutron_origin or NXguide_view are added to the NeXus format standard, I would argue in favor of using the NXmoderator group position over that of the NXsource.

@jl-wynen
Copy link
Member Author

This sounds like we should in general move away from using the 'source' in general and should reformulate it as 'neutron origin'. Detaching it from NeXus names would allow us to better customise it for different instruments. @SimonHeybrock did you already consider this when designing the workflow in ESSreduce?

@SimonHeybrock
Copy link
Member

Not sure which part you refer to @jl-wynen ?

@jl-wynen
Copy link
Member Author

Not using NXsource to define the flight path and t0. Right now, we load NXsource and store it as source_position which is then used in coordinate transforms.
Did you consider making this more generic and not relying on NXsource?

@SimonHeybrock
Copy link
Member

The only reason we used NXsource was that we assumed that that will define the moderator position. If that is not the case we should not do that, and use another component instead. Naming ("source position") comes from Mantid, so I do not mind changing that either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants