-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add a loader for mcstas files? #458
Comments
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. |
Greg said he has already tried to make a general one so let's have a look at that too...! |
Torben just found out McStas version 3 output breaks the 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: