Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #361 +/- ##
==========================================
+ Coverage 86.86% 87.77% +0.90%
==========================================
Files 40 42 +2
Lines 2856 3100 +244
==========================================
+ Hits 2481 2721 +240
- Misses 375 379 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6b20756 to
312a206
Compare
312a206 to
c34a7ac
Compare
c34a7ac to
0ec98c7
Compare
|
Thanks for putting the aggregate view together, it made the full reindexing story much easier to follow. Below is a high-level review of the whole stack. Each item is tagged with the constituent PR where it was introduced, so fixes can land in the right place. Summary of what the stack does
What worksFor merged, non-anomalous data with exact (merohedral) ambiguities, it works well. I took the Bugs that need fixing before mergeA. The pseudo-merohedral option ( ds = rs.read_mtz("tests/data/fmodel/6GL4.mtz")[["FMODEL"]].dropna() # P 1 2 1, a≈b
rs.algorithms.has_reindexing_ambiguity(ds, max_obliquity=5) # -> True
rs.algorithms.reindex_by_correlation(ds, ds, data_key="FMODEL",
reference_key="FMODEL", max_obliquity=5)
# PhaseAlignmentInputError: merged data must contain unique Miller indices after mapping to the ASUIt fails even when a dataset is compared with itself. Gemmi returns twin laws, and a twin law is not always an indexing ambiguity. Two of the three operators here ( Suggested fix: keep only operators B. Coarse bins make wrong operators score too high, so clean data gets rejected (#352)
Even random Wilson-distributed intensities with the same HKLs give about 0.2 on the wrong operator, where it should be about 0. As a result, noise-free copies of 1CTJ, 6ITG, 6DWF and 6H64, reindexed by their twin operator, raise C. Negative intensities crash the call (#352) Merged, unscaled intensities (e.g. Aimless IMEAN) often have an outer shell whose mean is ≤ 0. That currently raises Caveats to decide on or document
API, structure and docs, for consistency with the rest of the repo
StatusRequesting changes on the stack, but not on this aggregate, which isn't meant to be merged. A, B and C are blocking. The caveats should be decided or documented, and the API points in the last section can be settled together. Note: a line-by-line review on the constituent PRs (#351–#354) will follow once the bugs above (A, B and C) are fixed. |
! This PR was vibe-coded.
Important
This is a review-only aggregate view of the existing stacked PRs. It adds no new commits and should not be merged directly. The smaller PRs remain the merge path.
Stack context
This draft collects only the reindexing layers of #31 in one diff:
phase_alignment.py,has_origin_shift_ambiguity(), and their tests are deliberately excluded from this diff. They begin in #364 and are reviewed in #362.What this implements
DataSet, selected operator, candidate scores, runner-up score, and correlation gapReviewer focus
Please leave line-level review on the constituent PR where possible; this draft is intended to make the complete reindexing story easy to inspect in one place.
Related: #31, #174