-
Notifications
You must be signed in to change notification settings - Fork 16
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
Powder fitting #164
Powder fitting #164
Conversation
Change powspec to call spinwave() once to take advantage of chunking or mex threading Refactor sw_freemem() to poll memory max only every 10s Change sw_egrid() to not calculate Bose factor for T=0 (default) The above changes save ~30% time per iteration in a powder fit (now spinwave() eval is ~50% of time per iteration, was ~30%)
% (due to incompatible ground state). Default value is 1000. | ||
% | ||
% `'nQ'` | ||
% : Number of |Q| points to use for each cut to simulate cut thickness |
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.
What would happen is the cut thickness is << d|Q| resolution (I'm aware that the resolution might not be the same for all Q-vectors of equal |Q| - e.g. depends on scattering angle)?
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.
Maybe for each Q point in average, you also simulate a number of points inside the resolution ellipsoid? Would that work? or have I mis-understood how the MC works?
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.
Or do you do the resolution convolution on the simulated data before the powder averaging?
Discussed - @mducle to work on mex then @RichardWaiteSTFC to review and merge.
|
Closed in favour of #174 |
Adds a method to fit powder data.
To test, run this script with the attached data:
mnf2.mat.zip
cutpow.m
:It should take 1-2min to run the fit.
Note that for some reason,
lm
andlm2
(there are 3 implementations of the Levenberg-Marquardt algorithm inndbase
) doesn't work butlm3
does work.