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

Allow Fitter reuse in Model #287

Open
jdtsmith opened this issue May 13, 2024 · 1 comment
Open

Allow Fitter reuse in Model #287

jdtsmith opened this issue May 13, 2024 · 1 comment
Milestone

Comments

@jdtsmith
Copy link
Contributor

Right now Model as I understand it creates and disposes of Fitter objects frequently.

One of the key conceived speed improvements for the SPFitter is model re-use. I.e. the setup work done to build internal state for the fitter can be reused, if the next spectrum to be fitted differs only in flux (quite common for a cube). We need an opt-in flag to Model.fit, perhaps reuse=False which is the user saying the fitter can re-use things. This might also involve "pre-conditioning" the fit, e.g. by scaling powers/amplitudes up or down by the relative mean fluxes.

@jdtsmith
Copy link
Contributor Author

One possible simplification: if no reuse, create a new Fitter. If re-use, certify you have the same wavelengths/instrument/redshift/etc., and let Model use its old Fitter (informing it of the reuse).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant