Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
22c9a83
Initial integration of NUG into abinitio class.
j-c-c Feb 27, 2026
b6138e6
isort, black
j-c-c Feb 27, 2026
348ff17
Use numeric to handle cupy/numpy. Remove duplicate function.
j-c-c Mar 6, 2026
78cd5a5
tox
j-c-c Mar 9, 2026
64cd7b5
build full pf
j-c-c Mar 12, 2026
6f081aa
compute_fejer_weights method. Still need to optimize (very slow)
j-c-c Apr 7, 2026
0a3e88e
vectorize Wigner matrix comps. Vectorize fejer_weights comp.
j-c-c Apr 8, 2026
5738bd3
Add SO3 grid generation
j-c-c Apr 16, 2026
0c55de3
tox
j-c-c Apr 17, 2026
bb5fefb
use aspire symmetry parsing
j-c-c Apr 20, 2026
4b04c12
Use aspire ZYZ rotation convention
j-c-c Apr 20, 2026
93bf8cd
vectorize psd_projection, transform_block, transform_back_block
j-c-c Apr 21, 2026
b304d48
Vectorize update_S. 2x speedup!
j-c-c Apr 22, 2026
02218b3
vectorize print update component.
j-c-c Apr 22, 2026
b682279
intial add of proximal_refine
j-c-c Apr 24, 2026
8b8212a
Update base class. Fix Proximal Refinement bug. Add PR update diagnos…
j-c-c Apr 30, 2026
7795333
Add euler_est_Dm
j-c-c May 5, 2026
fc04dad
Use in-house polarFT and Sinogram. Add symmetry handling and logs
j-c-c May 13, 2026
d47f335
cleanup
j-c-c May 13, 2026
66a8ee6
Use saff-kuijlaars method for S2 grid
j-c-c May 14, 2026
01df0eb
initial test file
j-c-c May 15, 2026
620bb4a
clean up estimate_rotations
j-c-c May 15, 2026
c2c21b7
Explicit dtypes. Add dtype test. Add estimate_rotations test.
j-c-c May 19, 2026
b9829fe
Support shifts
j-c-c May 22, 2026
c917497
test shifts
j-c-c May 26, 2026
259c29e
Test Dn symmetry
j-c-c May 26, 2026
23a224d
move compare_rots_sym to utils
j-c-c May 29, 2026
c2b3606
Add generalized g_sync
j-c-c Jun 4, 2026
a064514
tox
j-c-c Jun 4, 2026
53c5875
Add g_sync test
j-c-c Jun 8, 2026
bcb6163
Use new g_sync in D2 test. Remove unused method
j-c-c Jun 8, 2026
2369c57
remove unused imports
j-c-c Jun 8, 2026
e5d6663
remove fast_radon_transform and wemd code path
j-c-c Jun 9, 2026
62a2b52
cleanup
j-c-c Jun 9, 2026
dc1a19d
Add function docstrings
j-c-c Jun 10, 2026
90edb31
Add param descrips for init
j-c-c Jun 15, 2026
14cf4b9
more params. cleanup.
j-c-c Jun 15, 2026
c4b07a9
remove commented out code
j-c-c Jun 15, 2026
afd1d2b
Test g_sync for clean case
j-c-c Jun 17, 2026
36f8280
xp in admm
j-c-c Jun 23, 2026
0356a9f
raise on unsupported symmetry
j-c-c Jun 23, 2026
51cd2b2
mark tests expensive. Add smoke test.
j-c-c Jun 23, 2026
604ea9b
tunable proximal refinement iterations
j-c-c Jun 24, 2026
f4d723e
code coverage for proximal refinement and print_update computations.
j-c-c Jun 25, 2026
0524dc9
test compare_rots_sym
j-c-c Jun 25, 2026
dee358c
test symmetry handling log messages
j-c-c Jun 25, 2026
16dd1b3
remove singleton handling for block transformations
j-c-c Jun 25, 2026
ed0b146
fij loss funtion docstring
j-c-c Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/aspire/abinitio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
from .J_sync import JSync
from .commonline_utils import (
build_outer_products,
compare_rots_sym,
g_sync,
g_sync_finite_group,
saff_kuijlaars,
)
from .commonline_base import Orient3D
from .commonline_matrix import CLOrient3D
from .commonline_nug import CommonlineNUG
from .commonline_sdp import CommonlineSDP
from .commonline_lud import CommonlineLUD
from .commonline_irls import CommonlineIRLS
Expand Down
35 changes: 2 additions & 33 deletions src/aspire/abinitio/commonline_d2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from aspire.utils.random import randn
from aspire.volume import DnSymmetryGroup

from .commonline_utils import _generate_shift_phase_and_filter
from .commonline_utils import _generate_shift_phase_and_filter, saff_kuijlaars

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -160,7 +160,7 @@ def _generate_lookup_data(self):
logger.info("Generating commonline lookup data.")
# Generate uniform grid on sphere with Saff-Kuijlaars and take one quarter
# of sphere because of D2 symmetry redundancy.
sphere_grid = self._saff_kuijlaars(self.grid_res)
sphere_grid = saff_kuijlaars(self.grid_res)
octant1_mask = np.all(sphere_grid > 0, axis=1)
octant2_mask = (
(sphere_grid[:, 0] > 0) & (sphere_grid[:, 1] > 0) & (sphere_grid[:, 2] < 0)
Expand Down Expand Up @@ -1822,37 +1822,6 @@ def _circ_seq(n1, n2, L):

return seq

@staticmethod
def _saff_kuijlaars(N):
"""
Generates N vertices on the unit sphere that are approximately evenly distributed.

This implements the recommended algorithm in spherical coordinates
(theta, phi) according to "Distributing many points on a sphere"
by E.B. Saff and A.B.J. Kuijlaars, Mathematical Intelligencer 19.1
(1997) 5--11.

:param N: Number of vertices to generate.

:return: Nx3 array of vertices in cartesian coordinates.
"""
k = np.arange(1, N + 1)
h = -1 + 2 * (k - 1) / (N - 1)
theta = np.arccos(h)
phi = np.zeros(N)

for i in range(1, N - 1):
phi[i] = (phi[i - 1] + 3.6 / (np.sqrt(N * (1 - h[i] ** 2)))) % (2 * np.pi)

# Spherical coordinates
x = np.sin(theta) * np.cos(phi)
y = np.sin(theta) * np.sin(phi)
z = np.cos(theta)

mesh = np.column_stack((x, y, z))

return mesh

@staticmethod
def _mark_equators(sphere_grid, eq_filter_angle):
"""
Expand Down
Loading