Skip to content
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

[Enhancement]: Supplement scipy.optimize.minimize (lsq) fitter with another fast optimizer #444

Open
1 task done
jbrande opened this issue Aug 4, 2022 · 1 comment
Open
1 task done
Assignees
Labels
enhancement New feature or request LC Fit

Comments

@jbrande
Copy link
Collaborator

jbrande commented Aug 4, 2022

Instrument

Light curve fitting (Stages 4-6)

What is your suggestion?

Currently, we use scipy.optimize.minimize to do least-squares fitting in Stage 5. Performance-wise, this works okay, but since we don't (can't?) pre-calculate the Jacobian/Hessian matrices for our transit models, we can't get the uncertainties on the parameters. For certain fitting methods in scipy.optimise.least_squares and scipy.optimize.curve_fit (trf and dogbox), scipy will do this for us, but their performance isn't great.

I think some of the other JWST analysis people are using lmfit, which should let us estimate uncertainties for any arbitrary fitting method.

Error traceback output

No response

What operating system are you using?

No response

What version of Python are you running?

No response

What Python packages do you have installed?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jbrande jbrande added the enhancement New feature or request label Aug 4, 2022
@github-actions github-actions bot added the LC Fit label Aug 4, 2022
@taylorbell57
Copy link
Collaborator

I definitely wouldn't replace scipy.optimize.minimize since it's definitely still a useful tool although certainly imperfect. Adding more methods and more fast methods for estimating uncertainties would be worthwhile though! The issue with least_squares is that you can't easily handle priors and inflate the uncertainties on your photometric precision

@taylorbell57 taylorbell57 removed their assignment Aug 19, 2022
@taylorbell57 taylorbell57 changed the title [Enhancement]: Replace scipy least-squares fitter with something else [Enhancement]: Supplement scipy.optimize.minimize (lsq) fitter with another fast optimizer Dec 6, 2022
@kevin218 kevin218 moved this to To do in Road to v1.1 Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request LC Fit
Projects
Status: To do
Development

No branches or pull requests

4 participants