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

Psf jacobian #132

Merged
merged 120 commits into from
Sep 13, 2023
Merged

Psf jacobian #132

merged 120 commits into from
Sep 13, 2023

Conversation

jeremyneveu
Copy link
Collaborator

@jeremyneveu jeremyneveu commented Jul 14, 2023

The goal of this PR is to speed-up Spectractor model computation:

  • faster matrix multiplications
  • faster PSF computations
  • faster Jacobian computations
  • faster wavelength calibration

We tested JAX but model is too complex to use automatic differentiation.

@coveralls
Copy link

coveralls commented Jul 14, 2023

Pull Request Test Coverage Report for Build 6169959432

  • 870 of 1026 (84.8%) changed or added relevant lines in 14 files are covered.
  • 80 unchanged lines in 5 files lost coverage.
  • Overall coverage increased (+5.9%) to 90.499%

Changes Missing Coverage Covered Lines Changed/Added Lines %
spectractor/fit/fit_spectrogram.py 66 68 97.06%
spectractor/simulation/simulator.py 65 75 86.67%
spectractor/extractor/spectrum.py 52 64 81.25%
spectractor/extractor/psf.py 121 135 89.63%
spectractor/fit/fitter.py 74 107 69.16%
spectractor/extractor/chromaticpsf.py 296 334 88.62%
spectractor/extractor/extractor.py 158 205 77.07%
Files with Coverage Reduction New Missed Lines %
spectractor/extractor/extractor.py 4 83.1%
spectractor/extractor/chromaticpsf.py 6 92.03%
spectractor/simulation/image_simulation.py 7 80.29%
spectractor/fit/fitter.py 15 87.5%
spectractor/fit/fit_multispectra.py 48 79.32%
Totals Coverage Status
Change from base Build 6094260689: 5.9%
Covered Lines: 6715
Relevant Lines: 7420

💛 - Coveralls

@jeremyneveu
Copy link
Collaborator Author

Test with rebin=1 on dataId = {'day_obs': 20220316, 'seq_num': 330, 'detector':0}: 6GB memory usage. FFM in 22m with ~30s per FFM iterations.

@jeremyneveu
Copy link
Collaborator Author

@mfisherlevine, do you think we should move to version 2.7 or 3.0? Big parts of the core of the code has been optimized and rewritten.

@mfisherlevine
Copy link
Collaborator

I don't have any strong feelings as to 2.7 vs 3.0. If there are significant core algorithmic changes I can certainly see the argument for moving to 3.0, but it's totally up to you 🙂 (Also, you might want to make point-releases to iterate on this new code, in which case 3.0 also makes more sense)

@jeremyneveu
Copy link
Collaborator Author

Ok, then I switch to 3.0 :) Do you still approve the PR?

@jeremyneveu jeremyneveu merged commit 5795091 into master Sep 13, 2023
2 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants