Open
Conversation
release 1.5.0
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.
This pull request introduces Mighell-based handling of zero-variance data points in the fitting routines. Instead of discarding zero-variance points, the new implementation allows for a hybrid objective that applies the Mighell substitution only to zero-variance points, while using standard weighted least squares elsewhere. The previous masking behavior remains available, and users can now select the objective mode via a new parameter on
MultiFitter,fit(), andfit_single_data_set_1d().New objective modes and Mighell handling:
'hybrid','mighell','legacy_mask','auto') for handling zero-variance points, with'hybrid'as the default. The Mighell-based approach substitutes only zero-variance points or, if selected, all points, improving fitting robustness and flexibility. (src/easyreflectometry/fitting.py, [1] [2]_prepare_fit_arraysto transform data according to the selected objective, and updated fitting routines to use this function. (src/easyreflectometry/fitting.py, [1] [2]src/easyreflectometry/fitting.py, src/easyreflectometry/fitting.pyL35-R313)Fit statistics and API improvements:
classical_chi2,classical_reduced_chi,objective_chi2,objective_reduced_chi) for easy access. (src/easyreflectometry/fitting.py, src/easyreflectometry/fitting.pyR338-R364)fit()andfit_single_data_set_1d()methods to accept anobjectiveparameter for per-call override of the zero-variance handling strategy. (src/easyreflectometry/fitting.py, src/easyreflectometry/fitting.pyL35-R313)Documentation and workflow:
MIGHELL_IMPLEMENTATION.mddocumenting the Mighell objective, its mathematical basis, and its practical implications in reflectometry fitting. (MIGHELL_IMPLEMENTATION.md, MIGHELL_IMPLEMENTATION.mdR1-R113)CHANGELOG.md, CHANGELOG.mdR1-R9).github/workflows/python-ci.yml, .github/workflows/python-ci.ymlL64-R64)