diff --git a/CHANGES.md b/CHANGES.md index f6cdcc0..661003a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,7 @@ # Changelog -## Upcoming +## v1.0.1 (upcoming) +Minor optimizations that make use of finufft v2.3. + +## v1.0.0 (2024-05-28) Initial release, with support for CPU, GPU, and batched periodograms diff --git a/pyproject.toml b/pyproject.toml index a1f418e..4984775 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,7 +12,7 @@ authors = [{ name = "Lehman Garrison" }, requires-python = ">=3.8" license = { file = "LICENSE" } urls = { Homepage = "https://github.com/flatironinstitute.org/nifty-ls" } -dependencies = ["numpy", "finufft >= 2.2"] +dependencies = ["numpy", "finufft >= 2.3"] dynamic = ["version"] [project.optional-dependencies] diff --git a/src/nifty_ls/cpu_helpers.cpp b/src/nifty_ls/cpu_helpers.cpp index 5642ba4..e51fbd3 100644 --- a/src/nifty_ls/cpu_helpers.cpp +++ b/src/nifty_ls/cpu_helpers.cpp @@ -174,12 +174,6 @@ void process_finufft_inputs( } w2(i, j) *= std::exp(phase_shift * t2(j)); } - - // TODO: if fmin/df is an integer, we may be able to do - // t = ((df * t) % 1) * 2 * np.pi - // Could help a lot with range-reduction performance. - t1(j) = std::fmod(t1(j), TWO_PI); - t2(j) = std::fmod(t2(j), TWO_PI); } } diff --git a/src/nifty_ls/cufinufft.py b/src/nifty_ls/cufinufft.py index 9f736bc..810ad9e 100644 --- a/src/nifty_ls/cufinufft.py +++ b/src/nifty_ls/cufinufft.py @@ -158,9 +158,6 @@ def lombscargle( phase_shift1 = cp.exp(1j * (Nshift + fmin / df) * t1) phase_shift2 = cp.exp(1j * (Nshift + fmin / df) * t2) - t1 %= 2 * cp.pi - t2 %= 2 * cp.pi - yw[:] = y * w2.real if fit_mean: # Up to now, w and w2 are identical diff --git a/src/nifty_ls/finufft.py b/src/nifty_ls/finufft.py index 4d22230..5692394 100644 --- a/src/nifty_ls/finufft.py +++ b/src/nifty_ls/finufft.py @@ -195,9 +195,6 @@ def lombscargle( phase_shift1 = np.exp(1j * (Nshift + fmin / df) * t1) phase_shift2 = np.exp(1j * (Nshift + fmin / df) * t2) - t1 %= 2 * np.pi - t2 %= 2 * np.pi - yw[:] = y * w2.real if fit_mean: # Up to now, w and w2 are identical