feat: GPU array processing with Cupy#24
Merged
PinkShnack merged 19 commits intoApr 22, 2026
Merged
Conversation
added 6 commits
April 16, 2026 15:44
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #24 +/- ##
==========================================
- Coverage 84.46% 79.96% -4.50%
==========================================
Files 21 22 +1
Lines 502 569 +67
==========================================
+ Hits 424 455 +31
- Misses 78 114 +36 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
@paulmueller I have added Cupy to nrefocus here. The 3D array processing I will do in another PR. Unfortunately the branch name is therefore a little off, but I feel like that's ok. Please review if you have the time. Very similar to the |
paulmueller
requested changes
Apr 22, 2026
Collaborator
Author
|
tests fresnel dataset created via: def test_2d_refocus1_fresnel():
pixel_size = 1e-6
rf = nrefocus.RefocusNumpy(field=np.arange(256).reshape(16, 16),
wavelength=8.25*pixel_size,
pixel_size=pixel_size,
medium_index=1.533,
distance=0,
kernel="fresnel",
padding=False)
refocused = rf.propagate(distance=2.13*pixel_size)
refocused_flat = np.array(refocused).flatten().view(float)
np.savetxt(data_path / "test_2d_refocus1_fresnel.txt", refocused_flat)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As done in qpretrieve, I would like to enable nrefocus to process 3D arrays, and have the option to process them on the GPU. Therefore, this will reflect qpretrieve's changes quick closely as described in #23.
To-do
xpsyntaxautof.pyneeds changing