Angular correlation code adde to extra.utils - #485
Open
TimBerberich wants to merge 2 commits into
Open
Conversation
JamesWrigley
requested changes
May 6, 2026
JamesWrigley
left a comment
Member
There was a problem hiding this comment.
Broadly looks fine, not that I'm an expert with XCCA 😛 Some thoughts:
- I would suggest putting
AngularCorrelatorand friends underapplications, it feels too specific a thing to go inutils. - The tests should pass.
- This should have a changelog entry.
Comment on lines
+239
to
+256
| r"""Compute the mask corrected cross-correlation function. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| data : NDArray[np.float64] | ||
| Image data on uniform polar grid. | ||
| mask : NDArray[np.bool] | ||
| (n_1,n_phi): Image mask on uniform polar grid. | ||
| max_order : int|None | ||
| Maximum considered Fourier series order. | ||
|
|
||
| Returns | ||
| ------- | ||
| tuple(NDArray[np.float64],NDArray[np.bool]) | ||
| ((n_q,n_q,2*max_order), (n_q,n_q,2*max_order)): (Cross-correlation function $C(q_1,q_2,\phi)$, Mask of cross-correlation function.) | ||
| If max_order == None the last dimension has size n_phi. | ||
|
|
||
| """ |
Member
|
(also, please either rebase or do a squash merge 🙈 ) |
TimBerberich
force-pushed
the
angular_correlation
branch
2 times, most recently
from
June 1, 2026 13:36
18746b2 to
bcf0b7b
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #485 +/- ##
==========================================
+ Coverage 72.97% 73.82% +0.85%
==========================================
Files 35 36 +1
Lines 6642 6943 +301
==========================================
+ Hits 4847 5126 +279
- Misses 1795 1817 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
TimBerberich
force-pushed
the
angular_correlation
branch
from
June 1, 2026 16:04
5c13c2b to
1c8735c
Compare
TimBerberich
force-pushed
the
angular_correlation
branch
from
June 1, 2026 16:52
006b2d4 to
d3195ef
Compare
Contributor
Author
|
So, everything should be ready to merge now. |
JamesWrigley
approved these changes
Jul 10, 2026
JamesWrigley
left a comment
Member
There was a problem hiding this comment.
Needs a rebase to fix the changelog merge conflict, but otherwise LGTM!
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.
This adds extra.utils.xcca which contains routines to compute cross-correlations of polar data with and without detector mask.
It also contains routines to compute cumulative/(iterative) averages and variances which are useful if you want compute the average ccf by splitting your entire dataset in parts and then merging computed partial results.
Example: