Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
fa61c5c
Initial integration of NUG into abinitio class.
j-c-c Feb 27, 2026
b733e89
isort, black
j-c-c Feb 27, 2026
bc5fa96
Use numeric to handle cupy/numpy. Remove duplicate function.
j-c-c Mar 6, 2026
6d8d676
tox
j-c-c Mar 9, 2026
9a57889
build full pf
j-c-c Mar 12, 2026
19ffb30
compute_fejer_weights method. Still need to optimize (very slow)
j-c-c Apr 7, 2026
1a28358
vectorize Wigner matrix comps. Vectorize fejer_weights comp.
j-c-c Apr 8, 2026
c987ce1
Add SO3 grid generation
j-c-c Apr 16, 2026
85c9aac
tox
j-c-c Apr 17, 2026
8be71f4
use aspire symmetry parsing
j-c-c Apr 20, 2026
b926aff
Use aspire ZYZ rotation convention
j-c-c Apr 20, 2026
41892f6
vectorize psd_projection, transform_block, transform_back_block
j-c-c Apr 21, 2026
8db6b2f
Vectorize update_S. 2x speedup!
j-c-c Apr 22, 2026
0ad2f11
vectorize print update component.
j-c-c Apr 22, 2026
10bb1bb
intial add of proximal_refine
j-c-c Apr 24, 2026
fea9351
Update base class. Fix Proximal Refinement bug. Add PR update diagnos…
j-c-c Apr 30, 2026
4307a44
Add euler_est_Dm
j-c-c May 5, 2026
2f50f54
Use in-house polarFT and Sinogram. Add symmetry handling and logs
j-c-c May 13, 2026
899b614
cleanup
j-c-c May 13, 2026
f7b843e
Use saff-kuijlaars method for S2 grid
j-c-c May 14, 2026
0a157c7
initial test file
j-c-c May 15, 2026
4d6668a
clean up estimate_rotations
j-c-c May 15, 2026
b176d8a
Explicit dtypes. Add dtype test. Add estimate_rotations test.
j-c-c May 19, 2026
3bb8ef6
Support shifts
j-c-c May 22, 2026
ea8105a
test shifts
j-c-c May 26, 2026
14e9bbe
Test Dn symmetry
j-c-c May 26, 2026
4a39e67
move compare_rots_sym to utils
j-c-c May 29, 2026
9f7eca1
Add generalized g_sync
j-c-c Jun 4, 2026
818caa4
tox
j-c-c Jun 4, 2026
4e66945
Add g_sync test
j-c-c Jun 8, 2026
2a622ce
Use new g_sync in D2 test. Remove unused method
j-c-c Jun 8, 2026
c519daa
remove unused imports
j-c-c Jun 8, 2026
1311a73
remove fast_radon_transform and wemd code path
j-c-c Jun 9, 2026
bd4ca9b
cleanup
j-c-c Jun 9, 2026
fe4a54c
Add function docstrings
j-c-c Jun 10, 2026
95a683d
Add param descrips for init
j-c-c Jun 15, 2026
ae24cdd
more params. cleanup.
j-c-c Jun 15, 2026
0d55306
remove commented out code
j-c-c Jun 15, 2026
28ba09b
Test g_sync for clean case
j-c-c Jun 17, 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