Repository navigation
feat: add ChebyshevBackground and first full Rietveld refinement example - #13
Merged
Merged
Conversation
…n-pr.yml The pin predates the March-Dollase (#119) and TOF profile (#120) bindings, which later steps use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diffpy.cmistructure 0.1.1 requires Python <3.14, so CI's tests on 3.14 could not install it. Cap requires-python at <3.14 in pyproject.toml and cookiecutter.json, and use 3.13 in the getting-started docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
@sbillinge Ready for review. please merge #12 first. Btw, heres the output with the new
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13 +/- ##
==========================================
+ Coverage 97.72% 99.08% +1.36%
==========================================
Files 6 9 +3
Lines 658 1638 +980
==========================================
+ Hits 643 1623 +980
Misses 15 15
🚀 New features to boost your workflow:
|
Contributor
Author
|
@sbillinge this is ready for review now that #12 is merged |
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.

What problem does this PR address?
Please merge #12 first.
Add backgrounds and the first full Rietveld refinement with a plain srfit
FitContribution("bragg + background").BackgroundandChebyshevBackground(backgrounds.py): backgrounds are srfitCalculators registered in the equation. The Chebyshev range is fixed when the background is made, and calculating outside it raises aValueError.fit_to_datais GSAS-II's automatic background (pybaselinesarpls), with fixed points and a weight for them.fit_to_pointsfits to points the user gives.plot_fitplots the background over the data before refining.PowderDiffractionGenerator): ObjCryst leaves these out, so their tails were missing inside the range (up to 8% of the maximum at the top edge for PbSO4). The generator now calculates on a grid extended upward by ObjCryst's own profile cut-off, which grows with the peak width (including hkl-dependent widths), and returns only the requested points.__init__.py.matplotlib,bg-mpl-stylesheets,pybaselines.PbSO4 x-ray refinement in GSAS-II's five stages (
tests/test_refinement.py):The final cell is within 0.003 Å of GSAS-II's. Tests: 259 passed locally.
What should the reviewer(s) do?
fit_to_data,fit_to_points,plot_fit) and its error messages.PowderDiffractionGenerator._update_gridand the helpers it calls. It is a workaround until ObjCryst lists reflections past the top of the grid.python refine_pbso4_xray.pyfrom the repo root to see the refinement and its plot.