Rename fourier_shift
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_shiftfunction tophase_shift_interpolateand 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_shiftfunction, advising users to usephase_shift_interpolateinstead.
Test Updates:
- Removed the old test file
fourierShift_test.pywhich tested thefourier_shiftfunction. - Added a new test file
phase_shift_interpolate_test.pyto test thephase_shift_interpolatefunction and ensure it works as expected. This file also includes a test to check the deprecation warning for the oldfourier_shiftfunction.
Import and Utility Updates:
- Updated imports in
kwave/utils/math.pyto include necessary modules for the new implementation.
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.