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
Utility functions for iterative algorithms #60
Conversation
Intended for extracting data in such a way that it matches the reconstruction grid. This is a performance-critical and error-prone step in iterative ptychography algorithms.
* Image and coordinate transformations * Shifted, cropped and rolled products and aggregation
Co-authored-by: Dieter Weber <d.weber@fz-juelich.de>
@uellue Is there are a rendered version of the sphinx doc available? In the alpaka-group, we use readthedoc. There is a CI job, which build the sphinx doc and provides an link to the result. |
At the moment the rendered documentation is only available after merging or by running |
Thanks. I was not sure, if the CI job provides an artifact of the build. But building locally is also fine. |
* Shift real and imaginary parts separately to support complex illumination * Iterate only over shape of updates, not the whole object, to improve scaling behavior with large objects and small updates. Use atomic add to avoid conflict between threads and blocks writing to the same memory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some comments and typo fixes. Maybe we can also make some diagrams for describing the coordinate systems involved, and how the transformations work?
Thanks!
Co-authored-by: Alexander Clausen <alex@gc-web.de>
Co-authored-by: Alexander Clausen <alex@gc-web.de>
Codecov Report
@@ Coverage Diff @@
## master #60 +/- ##
==========================================
- Coverage 64.08% 59.92% -4.16%
==========================================
Files 8 8
Lines 323 549 +226
Branches 38 66 +28
==========================================
+ Hits 207 329 +122
- Misses 104 206 +102
- Partials 12 14 +2
Continue to review full report at Codecov.
|
Co-authored-by: Alexander Clausen <alex@gc-web.de>
It looks like the current mac os x image doesn't include Python 3.6 anymore - we may need to switch to an older one (at least for 3.6). See here: https://github.com/actions/virtual-environments/blob/main/images/macos/toolsets/toolset-10.14.json https://github.com/actions/virtual-environments/blob/main/images/macos/toolsets/toolset-11.json |
Thx @sk1p! * Example notebook with more detail * Coordinate transform is always a factory function, no need for functools
* Also turn (i)fftshift_coords() into higher-order functions * Clarify and tweak example * Docs updates for clarity
Should I do sth about that in this PR? Can you give me a pointer? |
You could try to set the ptychography/azure-pipelines.yml Lines 192 to 202 in 18114c5
Should be possible to just specify |
See also LiberTEM/LiberTEM#1142 |
Thx @sk1p! :-)
Hm, that didn't work - still showing "Image: macOS-latest"... |
@sk1p is the notebook that shows the transforms understandable? Do we need more documentation, are there other things to address? It would be nice to merge this some time next week to make it easier to use in downstream code. :-) |
Yes, thanks!
I think documentation can always be improved, but let's merge this now (perfect is the enemy of good, and all that...) |
The functions can perform FFT shifts on the fly to reduce memory transfers. Both CPU and CUDA are supported. They are tested to conform precisely to the conventions of
libertem.api.create_com_analysis()
and alsoSSB_UDF
.CC @bangunarya @Sniper2k that's the stuff I have mentioned recently. If you'd like to try it, let me know! :-)
Contributor Checklist: