Repository navigation
Adding Chudley-Elliott Jump Diffusion Model - #246
Merged
henrikjacobsenfys merged 9 commits intoOct 20, 2026
Merged
Conversation
Contributor
Author
|
Btw: I tried adding a label properly, but think I don't have the permission to do so. |
markbujehein
force-pushed
the
chudley-elliot-model
branch
from
October 2, 2026 18:41
b56a740 to
8112834
Compare
henrikjacobsenfys
requested changes
Oct 5, 2026
…lling mistake in Mantid documentation)
…umpDiffusion tests
This was referenced Oct 19, 2026
…Diffusion model and update tests
…mprove test assertions
markbujehein
force-pushed
the
chudley-elliot-model
branch
from
October 19, 2026 13:45
955e826 to
8b50609
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #246 +/- ##
===========================================
+ Coverage 98.15% 98.18% +0.02%
===========================================
Files 60 61 +1
Lines 6066 6162 +96
Branches 1022 1033 +11
===========================================
+ Hits 5954 6050 +96
Misses 58 58
Partials 54 54
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
henrikjacobsenfys
approved these changes
Oct 20, 2026
- Add Jump Translational and Chudley-Elliott sections to diffusion_model.ipynb, with subheaders for each model - Name the models in the Diffusion model entry of the tutorials index - Add the Chudley and Elliott (1961) reference and "See also the tutorials" to the ChudleyElliottJumpDiffusion docstring - Remove the tutorials TODO (easyscience#273)
Contributor
Author
|
@henrikjacobsenfys the missing tutorial has been added for |
Member
|
Thanks! |
henrikjacobsenfys
merged commit Oct 20, 2026
2b9bcc8
into
easyscience:develop
17 of 20 checks passed
henrikjacobsenfys
added a commit
that referenced
this pull request
Oct 20, 2026
* update pixi (#266) * Adding Chudley-Elliott Jump Diffusion Model (#246) * Add ChudleyElliotJumpDiffusion model and corresponding tests * Enhance ChudleyElliotJumpDiffusion model documentation and tests; all checks passed * Fix: replace Chudley-Elliot with Chudley-Elliott (propegated from spelling mistake in Mantid documentation) * Fix: Add missing ChudleyElliottJumpDiffusion to public API and module exports * Fix: Improve test clarity and update unit handling in ChudleyElliottJumpDiffusion tests * Fix: Implement minimum width for residence time in ChudleyElliottJumpDiffusion model and update tests * Fix: Update error handling in ChudleyElliottJumpDiffusion model and improve test assertions * chore: pixi update and linting * Add jump diffusion tutorials and Chudley-Elliott citation - Add Jump Translational and Chudley-Elliott sections to diffusion_model.ipynb, with subheaders for each model - Name the models in the Diffusion model entry of the tutorials index - Add the Chudley and Elliott (1961) reference and "See also the tutorials" to the ChudleyElliottJumpDiffusion docstring - Remove the tutorials TODO (#273) * Speed up StretchedExponential evaluation (#268) * Speed up StretchedExponential quadrature 3-4x Evaluate the exp-sinh quadrature in cache-sized blocks with in-place temporaries, and drop nodes whose decaying exponent provably underflows exp to exactly zero. Results are unchanged to rounding and stay bitwise independent of block boundaries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Interpolate the StretchedExponential profile by default Add an interpolate flag (default True) that evaluates G_beta from a cached cubic-spline table of log(G / G(0)) on y = asinh(w / w_ref) instead of running the quadrature at every energy. Tables are cached per beta and grow on a fixed lattice, so fits stay smooth under finite-difference Jacobian steps. Accuracy is ~1e-7 of the peak for all beta; interpolate=False keeps the ~1e-11 quadrature. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add example, run pixi update --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Allow plotting parameters against Q^2 (#271) * Allow plotting parameters against Q^2 Analysis.plot_parameters and ParameterAnalysis.plot take an x_axis argument ('Q' or 'Q^2'). The values at each Q are unchanged; only the plotted coordinate is transformed, via the shared add_x_axis_coord helper and its Q_AXIS_TRANSFORMS table, so further axes are one entry. Closes #205 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Show the Lorentzian width against Q^2 in tutorial 1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * Align the data and residuals axes in plots with residuals (#270) slicerplot_with_residuals drew the residuals in a second Matplotlib figure below the main one. Each figure was tight_layout'ed on its own, so the axes' left edges depended on each panel's y tick label and y label widths and did not line up. Draw both panels as two axes of one figure with a shared x axis, so they are laid out together and share x limits, scale and zoom. figsize now sizes the whole figure, and the residuals panel hides its log buttons, since logX is shared and logY does not suit residuals. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: easyscience[bot] <2476259+easyscience[bot]@users.noreply.github.com> Co-authored-by: Henrik Jacobsen <henrik.jacobsen.fys@gmail.com> Co-authored-by: mark <191927387+markbujehein@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
This is an implementation of the Chudley-Elliott Jump Diffusion Model. The model is described in old Mantid documentation and in literature1, and provides a physical model of jump diffusion different from existing ones.
What Changed
The implementation adds:
New model:
ChudleyElliottJumpDiffusionclass implementing the jump diffusion model by Chudley and Elliott2meV(ifps).residence_time(jump_length(JumpTranslationalDiffusionas a template as the two are practically very similar (besides parameters and model).Unit Tests:
JumpTranslationalDiffusionhas been adapted toChudleyElliottJumpDiffusionto cover equivalent sanity checks and edge cases, and thusTestChudleyElliottJumpDiffusionis also written by usingTestJumpTranslationalDiffusionas a template.np.sinc(x)vs.sc.sin(x) / xin the width calculation.Configuration updates: I've followed
CONTRIBUTING.mdstep-by-step which also introduced linting of the various files, such aspyproject.tomlandpixi.toml. I've committed these as well as the changed would otherwise live in my working tree for ever; feel free to disregard these and tell me why I'm wrong!Why
Addresses #46
Scope Label
[scope] enhancement: This PR adds a new diffusion model feature, requiring a minor version bump (major.MINOR.patch)Implementation Notes
pixi run fix.References
Footnotes
Mantid 6.1.0 - Chudley-Elliot ↩
C T Chudley and R J Elliott 1961 Proc. Phys. Soc. 77 353, doi:10.1088/0370-1328/77/2/319 ↩