Skip to content

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

Closed
hzarei4 wants to merge 0 commit intobionanoimaging:mainfrom
hzarei4:main
Closed

fixing the shift of the center of the array for resampling#54
hzarei4 wants to merge 0 commit intobionanoimaging:mainfrom
hzarei4:main

Conversation

@hzarei4
Copy link
Copy Markdown
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)

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 17, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.92%. Comparing base (88e2b17) to head (95e1a99).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
src/damping.jl 33.33% 2 Missing ⚠️
src/resampling.jl 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
+ Coverage   94.03%   94.92%   +0.89%     
==========================================
  Files          19       19              
  Lines        1173     1143      -30     
==========================================
- Hits         1103     1085      -18     
+ Misses         70       58      -12     

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

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

@roflmaostc
Copy link
Copy Markdown
Member

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

@RainerHeintzmann
Copy link
Copy Markdown
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