[ESSREFLECTOMETRY] docs: better ground truth comparison in user guide - #739
Open
jokasimr wants to merge 3 commits into
Open
[ESSREFLECTOMETRY] docs: better ground truth comparison in user guide#739jokasimr wants to merge 3 commits into
jokasimr wants to merge 3 commits into
Conversation
jokasimr
force-pushed
the
better-ground-truth-comparison
branch
from
September 8, 2026 17:08
33c4e08 to
5aaadce
Compare
nvaytet
reviewed
Sep 9, 2026
| "To compare it with this measurement, we smooth it with a kernel whose width varies with $Q$ and uses this run's `Q_resolution` coordinate.\n", | ||
| "This standard deviation includes the wavelength, sample-size, and detector contributions, averaged over the angles contributing to each $Q$ bin.\n", | ||
| "\n", | ||
| "We use [Refl1D's `convolve_sampled`](https://refl1d.readthedocs.io/en/stable/_modules/refl1d/sample/reflectivity.html), which integrates a tabulated ideal curve against a tabulated kernel.\n", |
Member
| " x=q.values[valid.values],\n", | ||
| " dx=half_width.values[valid.values],\n", | ||
| ")\n", | ||
| "smoothed_ground_truth = sc.DataArray(\n", |
Member
There was a problem hiding this comment.
Having the plot in the notebook is great. It's unfortunate that we need so much code to produce it. Can we think of another way?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

It's nice to have a comparison that takes into account the instrument resolution, because then you can actually see that the results matches what we expect.
This is what the added figure looks like: