Repository navigation
Conversation
There was a problem hiding this comment.
I cleaned up the docs for frame unwrapping and WFM that were difficult to follow, with many thing duplicated in different notebooks.
Now we use analytical mode everywhere, and we just keep the one notebook that describes the 3 methods.
jokasimr
left a comment
There was a problem hiding this comment.
LGTM 👍
Just some minor comments on the changes in the WFM notebook.
| "source": [ | ||
| "# Wavelength frame multiplication\n", | ||
| "\n", | ||
| "Wavelength frame multiplication (WFM) is a technique commonly used at long-pulse facilities to improve the resolution of the results measured at the neutron detectors.\n", |
There was a problem hiding this comment.
Why does the explanation for the term WFM go away? Seem useful to have in the introduction.
| "\n", | ||
| "This is the basis for creating our lookup table." | ||
| "As a consistency check, because we actually know the wavelengths of the neutrons we created,\n", | ||
| "we can compare the true neutron wavelengths to those we computed above." |
There was a problem hiding this comment.
In this section it would be good if we also display a histogram over error (error := true_wavelength - computed_wavelength), or a histogram over "relative error".
It would be good because that more directly illustrates what we want to demonstrate: Are the wavelength estimates good or not? How good? Are they unbiased? Is the error distribution symmetric? Etc.
There was a problem hiding this comment.
Good suggestion. I started adding some plots, but I think I want to finally implement scipp/plopp#201 which would be useful here.
I'll probably go with this syntax plopp.residuals(wfm_computed, reference=true_wavelengths).
There was a problem hiding this comment.
But that is not what I meant in this case. I didn't mean difference of the histograms, I meant a histogram of the differences (for every event).
That is, we have events with two coordinates true_wavelength and estimated_wavelength, and I'd like to see a histogram of error:=true_wavelength-estimated_wavelength.
Something like this: https://scipp.github.io/ess/reflectometry/user-guide/freia/freia-visualizations.html#Error-of-the-wavelength-estimate
There was a problem hiding this comment.
Here you really see the effect of the thickness of the polygons: thicker (more uncertainty) in the middle of the 2 WFM frames, and thinner (more accurate) at the edges of the frames.
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "from ess.powder.types import DspacingBins, Filename, SampleRun, VanadiumRun\n", |
There was a problem hiding this comment.
It proved too difficult to get this to work with the default analytical wavelength LUT.
The example Geant4 data does not have any chopper info. Instead we relied on the "file" method, but if I want to activate this here, I have to create and register a new workflow just for this notebook to work:
@register_workflow
def DreamGeant4ProtonChargeWorkflowFileLUT() -> sciline.Pipeline:
"""
Workflow with default parameters for the Dream Geant4 simulation, using
proton charge for the normalization.
"""
return DreamGeant4Workflow(run_norm=RunNormalization.proton_charge, wavelength_from="file")which seems overkill (and I would probably also have to add more workflows for the other normalization modes). This shows a limitation of the method anyway, that you have an explosion of cases if you have more args to create the workflow.
Finally, it is pretty likely that this won't be used much moving forwards, as we are moving towards batch reduction GUIs anyway.
There was a problem hiding this comment.
To be clear, the solution here was to not execute this notebook when building the docs. We leave it in for now, but it will just look empty.
|
Any more comments @jokasimr ? |



Fixes #863