-
Couldn't load subscription status.
- Fork 3
Add simple POWGEN workflow #113
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
| positions=positions, | ||
| components=components, | ||
| pixel_size=pixel_size, |
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.
Why did you list these 3 arguments explicitly? They seem to just be forwarded to the scippneutron instrument_view.
Can they just be part of the kwargs?
Is it because you wanted to have the type-hints? I see they are missing from the scippneutron instrument_view. Maybe we should add them there instead?
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.
These are the explicit arguments of instrument_view. Listing them explicitly means that they can be found by help(powgen.instrument_view), autocompletion, etc.
|
I disabled the failing tests because this is a bug in Mantid. See mantidproject/mantid#33690 |
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 disabled handling of the empty instrument data because I can't seem to get it to work with normalisation by proton charge. See the long comment in |
|
@jl-wynen With the set of POWGEN data files we are using, I think the option you chose after normalisation by proton charge is fine. |
| "id": "df5f7a70-ac69-47dc-b0c1-1139728d2878", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### Focus into $2\\theta$ bins" |
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.
We renamed 'focus' to 'group' in the python function. Should we also remove the term Focus here?
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.
Removed all mentions of 'focus'
| " start=25.0,\n", | ||
| " stop=90.0,\n", | ||
| " num=16)\n", | ||
| "sample_focussed = diffraction.group_by_two_theta(sample_dspacing,\n", |
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.
| "sample_focussed = diffraction.group_by_two_theta(sample_dspacing,\n", | |
| "sample_grouped = diffraction.group_by_two_theta(sample_dspacing,\n", |
| " num=16)\n", | ||
| "sample_focussed = diffraction.group_by_two_theta(sample_dspacing,\n", | ||
| " edges=two_theta)\n", | ||
| "vana_focussed = diffraction.group_by_two_theta(vana_dspacing, edges=two_theta)" |
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.
| "vana_focussed = diffraction.group_by_two_theta(vana_dspacing, edges=two_theta)" | |
| "vana_grouped = diffraction.group_by_two_theta(vana_dspacing, edges=two_theta)" |
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "sc.histogram(all_spectra, bins=dspacing_edges).plot()" |
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 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.
Don't know. Must be some strange scaling in the unit from dividing them for normalisation.
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 sample and vanadium have different units for the proton charge. When dividing them, we get the 2.7e-10 scale in the plot. I changed normalize_by_vanadium to convert to unit='one' to eliminate the scale.
| "id": "fb474efb-692f-4f2d-9243-23ff9319dd76", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "For a better resolution, we now group ('focus') the sample and vanadium data into a number of bins in the scattering angle [$2\\theta$](https://scipp.github.io/scippneutron/user-guide/coordinate-transformations.html)\n", |
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 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.
Good catch!
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.
Looking good. Just one more suggestion for hiding the long url.
In addition, I don't see anything in the release notes.
Can you add something?
Thanks
Co-authored-by: Neil Vaytet <[email protected]>
No description provided.