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

fixing the shift of the center of the array for resampling #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hzarei4
Copy link
Contributor

@hzarei4 hzarei4 commented Feb 17, 2025

This is my proposed code for the shifting center for resampling around (1, 1).

This will fix the issue with the center of the array. Here is the runtime memory and time consumption:

julia> @time b = resample(a, (111, 111), shift_center=false);
  0.000446 seconds (25 allocations: 196.500 KiB)

julia> @time b = resample(a, (111, 111), shift_center=true);
  0.000405 seconds (26 allocations: 244.188 KiB)

Copy link

codecov bot commented Feb 17, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 93.88%. Comparing base (88e2b17) to head (ea100ed).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/resampling.jl 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
- Coverage   94.03%   93.88%   -0.15%     
==========================================
  Files          19       19              
  Lines        1173     1177       +4     
==========================================
+ Hits         1103     1105       +2     
- Misses         70       72       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@roflmaostc
Copy link
Member

Could you please add a simple 1D test case? intests/

@RainerHeintzmann
Copy link
Member

Hossein, you may have talked to me first :-) I think we are running in circles here. Felix insisted on not making the Fourier center the default and we keep hitting the wall at the same place.

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