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
Make _fitter_to_model_params
and _model_to_fit_params
public.
#12585
Merged
nden
merged 4 commits into
astropy:main
from
WilliamJamieson:feature/public_fitter_to_model_params
Dec 18, 2021
Merged
Make _fitter_to_model_params
and _model_to_fit_params
public.
#12585
nden
merged 4 commits into
astropy:main
from
WilliamJamieson:feature/public_fitter_to_model_params
Dec 18, 2021
Conversation
This file contains 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
Tagging @nden, @perrygreenfield, and @mcara for review. |
saimn
reviewed
Dec 10, 2021
pllim
added
the
API change
PRs and issues that change an existing API, possibly requiring a deprecation period
label
Dec 10, 2021
WilliamJamieson
force-pushed
the
feature/public_fitter_to_model_params
branch
from
December 14, 2021 19:55
b866d17
to
cf4b194
Compare
nden
approved these changes
Dec 17, 2021
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.
LGTM. Thanks!
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Dec 20, 2021
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Dec 20, 2021
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Dec 21, 2021
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Dec 21, 2021
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Jan 3, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Jan 6, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Jan 10, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Jan 12, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Jan 13, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Jan 27, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Feb 2, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Feb 15, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Feb 17, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 2, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 3, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 8, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 9, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 9, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 10, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 14, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Mar 31, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 4, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 8, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 11, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 19, 2022
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 20, 2022
Refactored fitter tests so that TRFLSQFitter identically to the LevMarLSQFitter. Added bound calculation for TRFLSTFitter. One test needs to be corrected. Provided a mechanism to fix issues with bounds and the fitter. Moved fully duplicated code into common parent class Moved objective_function to common parent class Refactored param_cov computation Refactored call method. Added more TRFLSQFitter tests and fixed no-scipy testing bug Expanded TRFLSQFitter tests Added skip for fitting ArcSine and ArcCosine due to bad domains. Added Changelog Added TRFLSQFitter to __all__ Support for astropy#12585's api change. Fix tolerance isort changes Fix for skipping tests correctly Fix xfails Fix codestyle Fix broken CI due to scipy updates Add documentation comments requested by nden. Added more tests for TRFLSQFitter in test_fitters.py Added more tests for TRFLSQFitter lm mode to remaining test suites Added tests for TRFLSQFitter using dogbox method Filter CI warnings from older scipy versions Change to using separate fitter classes for each new fitter method
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 20, 2022
Refactored fitter tests so that TRFLSQFitter identically to the LevMarLSQFitter. Added bound calculation for TRFLSTFitter. One test needs to be corrected. Provided a mechanism to fix issues with bounds and the fitter. Moved fully duplicated code into common parent class Moved objective_function to common parent class Refactored param_cov computation Refactored call method. Added more TRFLSQFitter tests and fixed no-scipy testing bug Expanded TRFLSQFitter tests Added skip for fitting ArcSine and ArcCosine due to bad domains. Added Changelog Added TRFLSQFitter to __all__ Support for astropy#12585's api change. Fix tolerance isort changes Fix for skipping tests correctly Fix xfails Fix codestyle Fix broken CI due to scipy updates Add documentation comments requested by nden. Added more tests for TRFLSQFitter in test_fitters.py Added more tests for TRFLSQFitter lm mode to remaining test suites Added tests for TRFLSQFitter using dogbox method Filter CI warnings from older scipy versions Change to using separate fitter classes for each new fitter method
WilliamJamieson
added a commit
to WilliamJamieson/astropy
that referenced
this pull request
Apr 21, 2022
Refactored fitter tests so that TRFLSQFitter identically to the LevMarLSQFitter. Added bound calculation for TRFLSTFitter. One test needs to be corrected. Provided a mechanism to fix issues with bounds and the fitter. Moved fully duplicated code into common parent class Moved objective_function to common parent class Refactored param_cov computation Refactored call method. Added more TRFLSQFitter tests and fixed no-scipy testing bug Expanded TRFLSQFitter tests Added skip for fitting ArcSine and ArcCosine due to bad domains. Added Changelog Added TRFLSQFitter to __all__ Support for astropy#12585's api change. Fix tolerance isort changes Fix for skipping tests correctly Fix xfails Fix codestyle Fix broken CI due to scipy updates Add documentation comments requested by nden. Added more tests for TRFLSQFitter in test_fitters.py Added more tests for TRFLSQFitter lm mode to remaining test suites Added tests for TRFLSQFitter using dogbox method Filter CI warnings from older scipy versions Change to using separate fitter classes for each new fitter method
dhomeier
pushed a commit
to dhomeier/astropy
that referenced
this pull request
Oct 28, 2022
Refactored fitter tests so that TRFLSQFitter identically to the LevMarLSQFitter. Added bound calculation for TRFLSTFitter. One test needs to be corrected. Provided a mechanism to fix issues with bounds and the fitter. Moved fully duplicated code into common parent class Moved objective_function to common parent class Refactored param_cov computation Refactored call method. Added more TRFLSQFitter tests and fixed no-scipy testing bug Expanded TRFLSQFitter tests Added skip for fitting ArcSine and ArcCosine due to bad domains. Added Changelog Added TRFLSQFitter to __all__ Support for astropy#12585's api change. Fix tolerance isort changes Fix for skipping tests correctly Fix xfails Fix codestyle Fix broken CI due to scipy updates Add documentation comments requested by nden. Added more tests for TRFLSQFitter in test_fitters.py Added more tests for TRFLSQFitter lm mode to remaining test suites Added tests for TRFLSQFitter using dogbox method Filter CI warnings from older scipy versions Change to using separate fitter classes for each new fitter method
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
API change
PRs and issues that change an existing API, possibly requiring a deprecation period
modeling
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.
Description
Use of the methods
_fitter_to_model_params
and_model_to_fit_params
fromastropy.modeling.fitting
when creating custom fitters or subclassing fitters has come up a few times for me recently (and others see #11735). It is unfortunate that these functions are private because using them externally then posses some dangers. Since using these methods is sometimes necessary when creating one's own fitters, this PR makes these methods public to avoid the issues associated with using astropy private methods outside astropy.Fixes #11735
Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
Extra CI
label.no-changelog-entry-needed
label. If this is a manual backport, use theskip-changelog-checks
label unless special changelog handling is necessary.astropy-bot
check might be missing; do not let the green checkmark fool you.backport-X.Y.x
label(s) before merge.