k-wave-python icon indicating copy to clipboard operation
k-wave-python copied to clipboard

Rename fourier_shift

Open waltsims opened this issue 11 months ago • 1 comments

This pull request introduces several changes to the kwave library, primarily focusing on renaming and improving the functionality of the Fourier shift interpolation method. It also includes updates to the corresponding tests to reflect these changes. The most important changes include renaming the fourier_shift function to phase_shift_interpolate, improving the function's documentation and implementation, and updating the test files accordingly.

Function Renaming and Improvement:

  • Renamed the fourier_shift function to phase_shift_interpolate and updated its implementation to improve precision and clarity. The new implementation includes better handling of dimensions and phase shifts in the Fourier domain.
  • Added a deprecation warning to the old fourier_shift function, advising users to use phase_shift_interpolate instead.

Test Updates:

  • Removed the old test file fourierShift_test.py which tested the fourier_shift function.
  • Added a new test file phase_shift_interpolate_test.py to test the phase_shift_interpolate function and ensure it works as expected. This file also includes a test to check the deprecation warning for the old fourier_shift function.

Import and Utility Updates:

  • Updated imports in kwave/utils/math.py to include necessary modules for the new implementation.

waltsims avatar Feb 10 '25 01:02 waltsims

Codecov Report

Attention: Patch coverage is 77.77778% with 4 lines in your changes missing coverage. Please review.

Project coverage is 73.23%. Comparing base (d6ea904) to head (a7ee788).

Files with missing lines Patch % Lines
kwave/utils/math.py 77.77% 2 Missing and 2 partials :warning:
Additional details and impacted files
@@                             Coverage Diff                             @@
##           refactor/deprecation-and-affine-cleanup     #551      +/-   ##
===========================================================================
- Coverage                                    73.23%   73.23%   -0.01%     
===========================================================================
  Files                                           47       47              
  Lines                                         6857     6856       -1     
  Branches                                      1308     1307       -1     
===========================================================================
- Hits                                          5022     5021       -1     
  Misses                                        1286     1286              
  Partials                                       549      549              
Flag Coverage Δ
3.10 73.23% <77.77%> (-0.01%) :arrow_down:
3.11 73.23% <77.77%> (-0.01%) :arrow_down:
3.12 73.23% <77.77%> (-0.01%) :arrow_down:
3.13 73.23% <77.77%> (-0.01%) :arrow_down:
macos-latest 73.20% <77.77%> (-0.01%) :arrow_down:
ubuntu-latest 73.20% <77.77%> (-0.01%) :arrow_down:
windows-latest 73.22% <77.77%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Feb 10 '25 01:02 codecov[bot]