-
Notifications
You must be signed in to change notification settings - Fork 2
Use monitor normalisation functions from ESSreduce #216
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
Conversation
For the monitor normalisation routines.
Required to work around scipp/essreduce#292
Required to work around scipp/essreduce#290
SimonHeybrock
left a comment
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.
The linked issue also talkes about vanadium binning and data binning not matching. As far as I can tell this is not being prevent here, right? Especially for the (typical?) case of scientists wanting to store and reuse processed vanadium from a file.
| return { | ||
| KeepEvents[SampleRun]: KeepEvents[SampleRun](True), | ||
| KeepEvents[VanadiumRun]: KeepEvents[VanadiumRun](False), | ||
| KeepEvents[VanadiumRun]: KeepEvents[VanadiumRun](True), |
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.
Is this now required to fix the bug? Does one have to use event mode in both or neither for correct results?
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.
It's not required. The fixup PR I made in ESSreduce addresses the histogram mode here. But using a histogram is less precise. In this case, we use lookup to get the monitor values with the bin centres of the detector. If the monitor has a finer binning than the detector, that will lead to ignoring many monitor bins.
| def convert_monitor_to_wavelength( | ||
| monitor: TofMonitor[RunType, MonitorType], | ||
| graph: MonitorCoordTransformGraph[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.
Wondering why we have the graph as a separate provider instead of lining? Seems simple and flexible enough?
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.
Because we do the same with the detector graph. I figured it's ultimately simplest to keep it symmetric.
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.
But it exposes implementation details (using transform_coords) in the compute 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.
Is that a problem? We seem to be fine with it for the detectors. And it gives a customisation point if we need it.
Not the issue I linked. That only mentions monitor bins. Are you referring to #168 ? There are tests in ESSreduce that check that the result is independent of the monitor binning. |
I mean this:
Is the new approach addressing this, since it is now not sensitive to the monitor bin size (assuming bin size is reasonable)? |
Correct. The implementation this uses is not sensitive to the monitor binning assuming a sensible binning. |
The choppers are now included in the table.
Requires scipp/essreduce#286
Fixes #167