Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8f39bb7
Initial integration of NUG into abinitio class.
j-c-c Feb 27, 2026
c78aa9d
isort, black
j-c-c Feb 27, 2026
45e555b
Use numeric to handle cupy/numpy. Remove duplicate function.
j-c-c Mar 6, 2026
ce13982
tox
j-c-c Mar 9, 2026
c0a3bdf
build full pf
j-c-c Mar 12, 2026
b8cbc7a
compute_fejer_weights method. Still need to optimize (very slow)
j-c-c Apr 7, 2026
eb0470c
vectorize Wigner matrix comps. Vectorize fejer_weights comp.
j-c-c Apr 8, 2026
1a8ecde
Add SO3 grid generation
j-c-c Apr 16, 2026
84b7fba
tox
j-c-c Apr 17, 2026
4255a33
use aspire symmetry parsing
j-c-c Apr 20, 2026
b7a1573
Use aspire ZYZ rotation convention
j-c-c Apr 20, 2026
3ae7c2a
vectorize psd_projection, transform_block, transform_back_block
j-c-c Apr 21, 2026
3d0b0c2
Vectorize update_S. 2x speedup!
j-c-c Apr 22, 2026
61affef
vectorize print update component.
j-c-c Apr 22, 2026
20186fc
intial add of proximal_refine
j-c-c Apr 24, 2026
43b2d44
Update base class. Fix Proximal Refinement bug. Add PR update diagnos…
j-c-c Apr 30, 2026
83fc0f4
Add euler_est_Dm
j-c-c May 5, 2026
6cb35c5
Use in-house polarFT and Sinogram. Add symmetry handling and logs
j-c-c May 13, 2026
0295cb3
cleanup
j-c-c May 13, 2026
9eb4ced
Use saff-kuijlaars method for S2 grid
j-c-c May 14, 2026
fdc6dc5
initial test file
j-c-c May 15, 2026
636a3e4
clean up estimate_rotations
j-c-c May 15, 2026
98d1c87
Explicit dtypes. Add dtype test. Add estimate_rotations test.
j-c-c May 19, 2026
0359eab
Support shifts
j-c-c May 22, 2026
154d45f
test shifts
j-c-c May 26, 2026
b675363
Test Dn symmetry
j-c-c May 26, 2026
5611791
move compare_rots_sym to utils
j-c-c May 29, 2026
3324cac
Add generalized g_sync
j-c-c Jun 4, 2026
43b8149
tox
j-c-c Jun 4, 2026
e29a80e
Add g_sync test
j-c-c Jun 8, 2026
40937f4
Use new g_sync in D2 test. Remove unused method
j-c-c Jun 8, 2026
5251440
remove unused imports
j-c-c Jun 8, 2026
9729fd5
remove fast_radon_transform and wemd code path
j-c-c Jun 9, 2026
c2ad19e
cleanup
j-c-c Jun 9, 2026
7ef4236
Add function docstrings
j-c-c Jun 10, 2026
d0f07b3
Add param descrips for init
j-c-c Jun 15, 2026
100d2c5
more params. cleanup.
j-c-c Jun 15, 2026
22cde0d
remove commented out code
j-c-c Jun 15, 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