You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I could be useful to generalise this and make it into a loader for mcstas files.
One issue is that the files contain the x and y positions of the events, but not the z positions (columns are ["p", "x", "y", "n", "id", "t"]).
Those, I guess, are deduced from where the detector is placed in the instrument.
So we would need to parse the instrument geometry to deduce them... which does not sound like a nice exercise.
In addition, the x and y coordinates are in the coordinate system of the detector, iirc. So this also means that if the detector is tilted with respect to the beamline axis (e.g. 45 degrees), then we also need the instrument geometry to convert those to real x,y,z in cartesian space.
Ideally for Scipp, at the end of the day, we need a list of x,y,z position in cartesian space, with absolute values (not relative to a detector panel).
Can this be achieved without parsing mcstas instrument files?
The text was updated successfully, but these errors were encountered:
Parts of this was probably implemented in https://github.com/scipp/essnmx. It also includes some parsing of the XML position information, but I do not know how generic that is.
Torben just found out McStas version 3 output breaks the nmx loader.
And Justin(NMX IDS) said they are not going to use McStas 3 so soon.
So we may need to survey how many of instrument data scientists are using which version of McStas when we implement this.
However, the breaking change in the output file should be trivial to adapt as far as Justin could see.
A simple loader for ascii and hdf mcstas files was added in the dmsc summer school repo.
I could be useful to generalise this and make it into a loader for mcstas files.
One issue is that the files contain the
x
andy
positions of the events, but not thez
positions (columns are["p", "x", "y", "n", "id", "t"]
).Those, I guess, are deduced from where the detector is placed in the instrument.
So we would need to parse the instrument geometry to deduce them... which does not sound like a nice exercise.
In addition, the
x
andy
coordinates are in the coordinate system of the detector, iirc. So this also means that if the detector is tilted with respect to the beamline axis (e.g. 45 degrees), then we also need the instrument geometry to convert those to realx,y,z
in cartesian space.Ideally for Scipp, at the end of the day, we need a list of
x,y,z
position in cartesian space, with absolute values (not relative to a detector panel).Can this be achieved without parsing mcstas instrument files?
The text was updated successfully, but these errors were encountered: