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

Template fft caching #180

Merged
merged 7 commits into from
Aug 30, 2024
Merged

Template fft caching #180

merged 7 commits into from
Aug 30, 2024

Conversation

jdbuhler
Copy link
Collaborator

Add more efficient handling of template FFTs. Use mkl_fft it if is present in the Python environment, and cache template FTs so that we can do convolve_vdisp faster. The code should gracefully fall back to reasonable behavior if mkl_fft is not present

jdbuhler and others added 5 commits August 28, 2024 22:25
  always set to their defaults in the templates object
  convolution we use in convolve_vdisp() on whether it
  is present.  oaconvolve is faster without it, but
  fftconvolve is faster with.
* cache template Fourier transforms to speed up
  vdisp convolution
* make agekeep a null slice instead of an arange
  when it is equal to the whole array, since
  the latter causes an array copy when used in indexing,
  while the former does not.  Provide nage because
  it cannot be inferred from a slice.
@coveralls
Copy link

coveralls commented Aug 29, 2024

Pull Request Test Coverage Report for Build CI-828

Details

  • 77 of 91 (84.62%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.4%) to 39.095%

Changes Missing Coverage Covered Lines Changed/Added Lines %
py/fastspecfit/continuum.py 16 23 69.57%
py/fastspecfit/templates.py 61 68 89.71%
Files with Coverage Reduction New Missed Lines %
py/fastspecfit/continuum.py 1 57.24%
Totals Coverage Status
Change from base Build CI-827: 0.4%
Covered Lines: 2834
Relevant Lines: 7249

💛 - Coveralls

@moustakas
Copy link
Member

Thanks for this contribution @jdbuhler!

@moustakas moustakas merged commit 2908501 into main Aug 30, 2024
12 checks passed
@moustakas moustakas deleted the template_fft_caching branch August 30, 2024 13:12
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.

3 participants