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

General loading of sample orientation #22

Open
jl-wynen opened this issue Sep 20, 2024 · 3 comments
Open

General loading of sample orientation #22

jl-wynen opened this issue Sep 20, 2024 · 3 comments

Comments

@jl-wynen
Copy link
Member

This issue also pertains to the file writer and maybe simulation framework. But I didn't know where else to put it.

The current workflow loads the sample orientation using the a3, a4 parameters of a McStas simulation:

# this is very BIFROST simulation specific -- can it be less so?
# TODO use the _sample_ orientation itself to define a3 (and goniometer angles?)
logs = _load_named(data['entry/parameters'], snx.NXlog, ('a3', 'a4'))

This won't work for 'real' data. As the TODO comment suggests, we should probably use NXsample. See in particular sample_orientation and orientation_matrix. I don't know how those are meant to be used or why there are two different fields.

We already have some related code: https://github.com/scipp/scippneutron/blob/3d6664b861da0b770fed4c06d9162323f48f4d4f/src/scippneutron/conversion/tof.py#L552

@SimonHeybrock
Copy link
Member

Note that NXsample should be loaded correctly by ScippNexus if it contains such matrices.

@jl-wynen
Copy link
Member Author

I talked to Greg about this offline. It seems unlikely that we will use the sample instead of a3, a4. The latter encode the orientation of the sample table not the sample itself. Data reduction only really needs the orientation of the table. And that will be encoded as some kind of log from NICOS. So that might well be in /entry/parameters which has class NXparameters.

@jl-wynen
Copy link
Member Author

I am keeping the issue open until we have a clear decision.

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

2 participants