scipp / essreflectometry

Reflectometry data reduction for the European Spallation Source
https://scipp.github.io/essreflectometry/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Change coordinates to reflectometry coordinate system #14

Open arm61 opened 2 years ago

arm61 commented 2 years ago

Currently an internal (or maybe NeXus) standard is used for what is x, y, and z. This doesn't work for reflectometry where there is already an accepted standard that depends on the sample orientation (see https://orsopy.readthedocs.io/en/latest/orsopy.fileio.base.html#orsopy.fileio.base.ValueVector). The Amor code should be modified to adhere to this reflectometry standard.

SimonHeybrock commented 1 month ago

@jokasimr Is this still relevant with the recent rewrite?

jokasimr commented 1 month ago

Yes it is still relevant. But I'm not sure if we want to do anything about it. It would make using the coordinate transformation code in scippneutron more complicated.

Essreflectometry uses a global coordinate system similar to the rest of the instrument workflows. That is, sample is origin, z is the 'beam direction' (this becomes fuzzy when it comes to instruments with focusing like amor and estia, but it's basically the vector from sample to the the detector, projected to the horizontal plane), y is up, and x is whatever is left.

SimonHeybrock commented 1 month ago

Is there a way to avoid referring to x, y, z at all, e.g., by callings things up, sample_normal, etc.?

jl-wynen commented 1 month ago

This can mask some differences. But there is a fundamental difference between reflectometry and the other techniques. Normally, we define

But in reflectometry it seems that people use