forked from tsdev/spinw
-
Notifications
You must be signed in to change notification settings - Fork 17
More usability improvements sw fitpowder #210
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
Merged
RichardWaiteSTFC
merged 33 commits into
master
from
more_usability_improvements_sw_fitpowder
Sep 10, 2025
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
a7e78cd
Fix bug in estimate_scale_factor - background already added to ycalc
RichardWaiteSTFC f7dd48e
Add new function to fit bg and scale parameters to all data
RichardWaiteSTFC 127156e
Support any ndbase optimizer in fit_background
RichardWaiteSTFC d04fe5c
Add method to plot background region on figures
RichardWaiteSTFC 9aa01e4
Add function (and tests) to set background region
RichardWaiteSTFC 4c25403
Set sensible background when changing strategy
RichardWaiteSTFC 2869cff
Handle edges/nans properly in avg. of error when taking 1D cuts
RichardWaiteSTFC cc82c7f
Add method to clear background region
RichardWaiteSTFC 91e673b
Support general polynomial background in Q and en
RichardWaiteSTFC 4464c7f
Add unit tests for setting polynomial order
RichardWaiteSTFC 0ad70f0
Use 2D data Q bins when replace 1D cuts
RichardWaiteSTFC df70190
Set SigP to 0 for fixed parameters in lm4
RichardWaiteSTFC 40eca62
Fix bug for 1D cuts now using 2D Q bins
RichardWaiteSTFC 7a6a70e
Update tutorial to include setting bg strategy and setting bg region
RichardWaiteSTFC 7b470aa
Add method to export data in struct form
RichardWaiteSTFC f8e4567
Fix rebin_powspec_to_1D_cuts bug causing test failure
RichardWaiteSTFC 17e2b1c
Add unit tests for export_data method
RichardWaiteSTFC 484018d
Update tutorial with changing polynomial order
RichardWaiteSTFC e934108
Swap order of bg parameters (Q first) and add bg param labels
RichardWaiteSTFC 12657f6
Update changing bg strategy tests with non-identical bg parameters
RichardWaiteSTFC 718275e
Add ability to set background parameters, bounds etc. using string
RichardWaiteSTFC 4031e9f
Add tests for setting bg parameters etc. with string labels
RichardWaiteSTFC 4dfae05
Fix bug in background param label order
RichardWaiteSTFC a7b4b0e
Add method to nicely print/display parameters
RichardWaiteSTFC 016b604
Update tutorial with parameter display
RichardWaiteSTFC f0c6c2a
Stop scaling covariance by variance of residuals
RichardWaiteSTFC 5263316
Fix bug in getting qcens of cuts when using binning in 2D data
RichardWaiteSTFC 6e687a1
Improve plot formatting
RichardWaiteSTFC 78177cf
Support char and cell of char in bg param setter
RichardWaiteSTFC 4734e78
Save file when export data
RichardWaiteSTFC 8e0376c
Add check for integer npoly
RichardWaiteSTFC 92bbcd3
Remove comment form tutorial docs
RichardWaiteSTFC 6ae56d9
Support specifying 1D cuts with array of q-values and test
RichardWaiteSTFC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
According to the comment in line 85, the
interceptindex is3- but here you're changing parameter index2(which shouldslope_q, right?)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.
Thanks, just checked this and the comment on line 85 refers to the equivalent planar background (which are checked on line 91). The parameters being set here are for the individual 1D cuts - i.e. parameter 2 corresponds to
E0- this is whatdisp_paramsgivesI will update the comment on line 85 to be clearer
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.
@RichardWaiteSTFC bump...