Skip to content

Refine and rank possible origin shifts - #357

Draft
tjlane wants to merge 1 commit into
codex/phase-alignment-06-bounded-fftfrom
codex/phase-alignment-07-origin-ranking
Draft

Refine and rank possible origin shifts#357
tjlane wants to merge 1 commit into
codex/phase-alignment-06-bounded-fftfrom
codex/phase-alignment-07-origin-ranking

Conversation

@tjlane

@tjlane tjlane commented Aug 22, 2026

Copy link
Copy Markdown
Member

! This PR was vibe-coded.

Stack

Part 7 of 11 for #31. Depends on #356. Merge bottom-up.

Next branch: codex/phase-alignment-08-phase-data.

What this implements

Adds the exact weighted circular phase objective and analytic gradient, continuous local refinement, per-coset candidate ranking, and equivalence reduction modulo lattice and centering translations.

Every retained FFT maximum is refined within its allowed polar coordinates. Crystallographically equivalent solutions are collapsed before ranking.

Tests

The layer covers empty candidate sets, optimizer failure propagation, centering equivalence, and the seeded noisy P 21 regression that motivated the constrained per-coset FFT. The new search matches the dense reference for the pinned failure case.

Reviewer focus

  • Objective and gradient signs relative to the internal translation convention.
  • Refinement only within the allowed polar subspace.
  • Centering-equivalence reduction and ranking of experimentally distinguishable basins.

Related: #31 and #174.

@tjlane tjlane changed the title Add symmetry-aware origin ranking Refine and rank possible origin shifts Aug 24, 2026
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.

1 participant