-
Notifications
You must be signed in to change notification settings - Fork 3
Mcstas to nexus #186
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
base: main
Are you sure you want to change the base?
Mcstas to nexus #186
Conversation
…and essdiffraction)
src/ess/estia/conversions.py
Outdated
| return sc.atan2(y=p.fields.x, x=p.fields.z) - detector_rotation.to(unit='rad') | ||
|
|
||
|
|
||
| def detector_ltotal_from_raw( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remind me why we need a special provider for this for Estia?
I would have expected that the generic nexus workflow can compute Ltotal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no special reason. I didn't know there was a provider for that already. That's good 👍 I'll remove it and see if it still runs.
src/ess/estia/conversions.py
Outdated
|
|
||
|
|
||
| def mcstas_wavelength_coordinate_transformation_graph() -> CoordTransformationGraph: | ||
| def mcstas_wavelength_coordinate_transformation_graph( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I suggest we move all the McStas-related stuff into the mcstas.py file?
I feel it would make things better organised.
| proton_current: ProtonCurrent[RunType], | ||
| graph: CoordTransformationGraph, | ||
| graph: CoordTransformationGraph[RunType], | ||
| ) -> ReducibleData[RunType]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but this reminds me that ReducibleData should probably be renamed to CorrectedDetector? (according to the new naming scheme)
src/ess/estia/load.py
Outdated
|
|
||
|
|
||
| def load_mcstas_events( | ||
| def load_mcstas_provider( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also move the mcstas-related code into the mcstas file?
tools/mcstas_to_nexus.ipynb
Outdated
| "id": "5", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "## Detector view from the created nexus file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep the notebook concise and just have the conversion to nexus file and drop the detector view and computing reflectivity curves. That way, the notebook has a single clear goal.
Fixes #183
Will be rebased on main once #185 is merged.