Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
62f8432
Initial integration of NUG into abinitio class.
j-c-c Feb 27, 2026
806fa5a
isort, black
j-c-c Feb 27, 2026
ec8ea63
Use numeric to handle cupy/numpy. Remove duplicate function.
j-c-c Mar 6, 2026
6aa21f4
tox
j-c-c Mar 9, 2026
9ae1e14
build full pf
j-c-c Mar 12, 2026
fa250ca
compute_fejer_weights method. Still need to optimize (very slow)
j-c-c Apr 7, 2026
ad70b47
vectorize Wigner matrix comps. Vectorize fejer_weights comp.
j-c-c Apr 8, 2026
514d961
Add SO3 grid generation
j-c-c Apr 16, 2026
2ea821d
tox
j-c-c Apr 17, 2026
07429f9
use aspire symmetry parsing
j-c-c Apr 20, 2026
01fce21
Use aspire ZYZ rotation convention
j-c-c Apr 20, 2026
20d6875
vectorize psd_projection, transform_block, transform_back_block
j-c-c Apr 21, 2026
5b02013
Vectorize update_S. 2x speedup!
j-c-c Apr 22, 2026
3bf6433
vectorize print update component.
j-c-c Apr 22, 2026
d144c90
intial add of proximal_refine
j-c-c Apr 24, 2026
5d3cbf0
Update base class. Fix Proximal Refinement bug. Add PR update diagnos…
j-c-c Apr 30, 2026
b1709ae
Add euler_est_Dm
j-c-c May 5, 2026
0cd9c2b
Use in-house polarFT and Sinogram. Add symmetry handling and logs
j-c-c May 13, 2026
0c968f9
cleanup
j-c-c May 13, 2026
ea6e48b
Use saff-kuijlaars method for S2 grid
j-c-c May 14, 2026
d97856e
initial test file
j-c-c May 15, 2026
634f33a
clean up estimate_rotations
j-c-c May 15, 2026
e261767
Explicit dtypes. Add dtype test. Add estimate_rotations test.
j-c-c May 19, 2026
11d0280
Support shifts
j-c-c May 22, 2026
8efb14a
test shifts
j-c-c May 26, 2026
525f4a0
Test Dn symmetry
j-c-c May 26, 2026
50a65ea
move compare_rots_sym to utils
j-c-c May 29, 2026
26a3ca5
Add generalized g_sync
j-c-c Jun 4, 2026
7198102
tox
j-c-c Jun 4, 2026
31dd636
Add g_sync test
j-c-c Jun 8, 2026
56a8a08
Use new g_sync in D2 test. Remove unused method
j-c-c Jun 8, 2026
7459604
remove unused imports
j-c-c Jun 8, 2026
e083030
remove fast_radon_transform and wemd code path
j-c-c Jun 9, 2026
086cade
cleanup
j-c-c Jun 9, 2026
ebef939
Add function docstrings
j-c-c Jun 10, 2026
ef7b9a4
Add param descrips for init
j-c-c Jun 15, 2026
de83f46
more params. cleanup.
j-c-c Jun 15, 2026
6cbb150
remove commented out code
j-c-c Jun 15, 2026
e222110
Test g_sync for clean case
j-c-c Jun 17, 2026
4e36063
xp in admm
j-c-c Jun 23, 2026
1b9f834
raise on unsupported symmetry
j-c-c Jun 23, 2026
fa05e0c
mark tests expensive. Add smoke test.
j-c-c Jun 23, 2026
f98912c
tunable proximal refinement iterations
j-c-c Jun 24, 2026
a59b430
code coverage for proximal refinement and print_update computations.
j-c-c Jun 25, 2026
4a89ca4
test compare_rots_sym
j-c-c Jun 25, 2026
f1bae4d
test symmetry handling log messages
j-c-c Jun 25, 2026
3ac9379
remove singleton handling for block transformations
j-c-c Jun 25, 2026
73f7638
fij loss funtion docstring
j-c-c Jun 25, 2026
3a69f8c
Add Defaults to param descriptions
j-c-c Jun 29, 2026
ba52724
add vectorized computation. some cleanup.
j-c-c Jun 29, 2026
95a185f
fix test docstring
j-c-c Jun 29, 2026
e864b6c
remove time
j-c-c Jun 29, 2026
cb5b942
cleanup index creation
j-c-c Jun 29, 2026
0f49762
docstrings and code comments for main ADMM step
j-c-c Jun 30, 2026
277c17a
docstring for compare_rots_sym
j-c-c Jun 30, 2026
4e5e268
compute_coeff code comments
j-c-c Jul 1, 2026
5e0b07e
proximal_refine code commentary
j-c-c Jul 1, 2026
46f37bc
some cleanup
j-c-c Jul 1, 2026
702c102
missing xp's in print_update
j-c-c Jul 28, 2026
bf640ed
add reference for g_sync_finite_group method
j-c-c Jul 29, 2026
8c3b5da
Initial port of C1 admm
j-c-c Aug 13, 2026
79c7262
build clmatrix from X_est for C1 euler est
j-c-c Aug 14, 2026
b77f022
populate upper tri with clmatrix loop. Port scalar rotratio_eulerangle.
j-c-c Aug 18, 2026
5938d68
tox
j-c-c Aug 18, 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
Loading