Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
433 commits
Select commit Hold shift + click to select a range
c8484a8
cleaned up tox syntax remarks
garrettwrong Aug 9, 2024
d58d6ff
fixed docs
Aug 15, 2024
700468b
fixed minor errors and created tests for str, repr methods
Aug 19, 2024
ffd43c8
Back Project ~> Backproject
garrettwrong Aug 26, 2024
dfa708c
replace `_data` in test_sinagram
garrettwrong Aug 26, 2024
8af26fa
init add
garrettwrong Mar 27, 2024
08238c4
fix typos
garrettwrong Mar 27, 2024
e67d871
cleanup S init and usage, func names, etc
garrettwrong Apr 2, 2024
1bbeefc
stub in W
garrettwrong Apr 4, 2024
ca881b2
stub in W
garrettwrong Apr 5, 2024
56a51c4
begin stubbing in actual S weight computation
garrettwrong Apr 5, 2024
fa708df
fix typo bug
garrettwrong Apr 8, 2024
8b27e65
fix rot reshape bug and stub in probability_scores
garrettwrong Apr 8, 2024
138ece9
stub in triangle scores and pair probabilities
garrettwrong Apr 9, 2024
58fbbe7
tox checks
garrettwrong Apr 9, 2024
5856562
light cleanup
garrettwrong Apr 9, 2024
dbedd95
J weighting
garrettwrong Apr 10, 2024
d4774c2
add note about possible ij jk bug
garrettwrong Apr 10, 2024
f33ddf7
hack in cupy kernel
garrettwrong Apr 11, 2024
03019c0
quick test file
garrettwrong Apr 11, 2024
6c639bc
stashing
garrettwrong Apr 11, 2024
e70fe73
black
garrettwrong Apr 11, 2024
a1b2c95
debug
garrettwrong Apr 11, 2024
d0ce1d8
stashing, cupy code mostly works
garrettwrong Apr 12, 2024
88e6d5d
still debating that bug, but stashing here
garrettwrong Apr 12, 2024
b7a9a64
autoconf gpu
garrettwrong Apr 16, 2024
1166fbb
rm debug comments after checking matmul
garrettwrong Apr 23, 2024
0043330
fixup Rijk_lmnop muls
garrettwrong Apr 23, 2024
2e598cf
re-implement matmul
garrettwrong Apr 24, 2024
ca8d7b1
add pairs prob kernel
garrettwrong Apr 24, 2024
561015a
add triangle scores cupy kernel
garrettwrong Apr 26, 2024
c5f72c5
initial bulk refactor
garrettwrong Apr 26, 2024
095d54a
initial cupy comparison test add
garrettwrong Apr 26, 2024
a5fa154
cleanup cl3n compare test a little
garrettwrong Apr 26, 2024
db74da5
rm merged test file
garrettwrong Apr 26, 2024
d47251b
fixup manifest
garrettwrong Apr 26, 2024
d1fe91c
remove unused cum_scores
garrettwrong Apr 26, 2024
b0fab80
atomic stv
garrettwrong Apr 29, 2024
f4680e1
convert remaining kernels to use atomics instead of naive array safety
garrettwrong Apr 29, 2024
7eb9d17
add some documentation
garrettwrong Apr 29, 2024
d67c467
more cleanup
garrettwrong Apr 29, 2024
de38338
looks like this actually needs double precision.
garrettwrong Apr 29, 2024
06e2b36
fix precision bug in CL sync3n power method.
garrettwrong Apr 29, 2024
fe9de1e
fixup some of the dtypes
garrettwrong Apr 29, 2024
eaa15a9
conditionally run host-gpu comparison
garrettwrong Apr 29, 2024
48ba46e
add MATLAB comparison tests
garrettwrong May 7, 2024
f15bef5
Allow sync3n methods to run in singles via upcasting
garrettwrong May 7, 2024
277b0dc
Update some docstrings
garrettwrong Jul 3, 2024
2d886e3
initial add cl sync3n test
garrettwrong Jul 3, 2024
e6fddd6
add minimal test
garrettwrong Jul 3, 2024
6c21b91
actually test the different dtypes
garrettwrong Jul 3, 2024
6b6f86f
mark float64 and odd sync3n as expensive
garrettwrong Jul 3, 2024
735b8fe
first pass addressing review remarks
garrettwrong Jul 19, 2024
bd6ba2b
move initial rotation estimate lines into estimate_rotations
garrettwrong Jul 19, 2024
abe130e
important progress bar
garrettwrong Aug 9, 2024
7cf3eaa
Use trust region method for S weight least squares
garrettwrong Aug 13, 2024
d365de6
use class mangled names for gpu methods
garrettwrong Aug 19, 2024
c0fdbf9
typo
garrettwrong Aug 19, 2024
8d571b7
Add disable_gpu sync3n flag
garrettwrong Aug 27, 2024
24d6276
P->W typo
garrettwrong Aug 27, 2024
2d96959
use more specific language instead of resolution
garrettwrong Aug 27, 2024
9374f0a
Replace histogram logic
garrettwrong Aug 27, 2024
565b61c
factor out sync3n score body
garrettwrong Aug 27, 2024
6570545
Revert "factor out sync3n score body"
garrettwrong Aug 28, 2024
758df6b
black style
garrettwrong Aug 28, 2024
540b5b7
fix fuzzy mask dtypes
garrettwrong Sep 3, 2024
8b69fe7
fix rise time
garrettwrong Sep 3, 2024
9dababa
update finufft and cufinufft to 2.3.0
garrettwrong Aug 21, 2024
625f06e
revert a finufft dtype workaround
garrettwrong Sep 11, 2024
0a8aa19
remove the deepcopy finufft workaround
garrettwrong Sep 11, 2024
338f512
begin looking at removing pyshtools
garrettwrong Sep 11, 2024
01ae621
purge shtools
garrettwrong Sep 11, 2024
650241e
tox
garrettwrong Sep 12, 2024
bfc3b43
implement sph_harm using recurance form of norm assoc legendre
garrettwrong Sep 12, 2024
f03ed8b
self review cleanup
garrettwrong Sep 12, 2024
4636358
Fixup -m sph_harm case and add test.
garrettwrong Sep 12, 2024
3326850
remove scikit radon warning by adjusting radial mask for test image t…
j-c-c Aug 29, 2024
82431ee
tox
j-c-c Aug 29, 2024
e9e7ca3
resolve scipy cg warning by adjusting version in wrapper to 1.12.0
j-c-c Aug 29, 2024
4b37a23
Resolve Matplotlib warning by explicilty closing plots in testing.
j-c-c Aug 29, 2024
2f8b610
explicitly close figures in matplotlib test wrapper.
j-c-c Sep 3, 2024
cbe5232
Resolve FRC legend warning by adding default label for single correla…
j-c-c Sep 3, 2024
326ada0
resolve numpy.product warning
j-c-c Sep 3, 2024
007fcef
resolve Conversion of an array wit
j-c-c Sep 3, 2024
102f287
Resolve expected BlkDiagMatrix truncation warning.
j-c-c Sep 3, 2024
d209161
Resolve test_micrograph_source warnings by using zeros instead of emp…
j-c-c Sep 4, 2024
00158f4
Resolve test_image.py warning. Remove Ray xfail and use context to ch…
j-c-c Sep 9, 2024
f7b8c88
resolve test_FLEbasis2D.py warnings.
j-c-c Sep 9, 2024
a3fc7a0
resolve numpy multiply overflow warning by using ones for test image …
j-c-c Sep 9, 2024
1500e96
resolve test_diag_matrix.py invalid cast value warning, by replacing …
j-c-c Sep 9, 2024
0719bec
catch np.exp overflow warnings
j-c-c Sep 10, 2024
0fe37ce
Add comments explaining changes.
j-c-c Sep 10, 2024
0df540a
Add pytest --strict-warnings to CI workflows.
j-c-c Sep 10, 2024
8ae3daf
Use PYTHONWARNINGS=error when python runs pytest.
j-c-c Sep 10, 2024
5b75caf
enforce C order on signal for cufinufft transform.
j-c-c Sep 10, 2024
ed34760
Skip jobs on CI that will error on cached warnings. ampere, osx, long…
j-c-c Sep 11, 2024
4d7bc49
Only check warnings on ampere_gpu job.
j-c-c Sep 11, 2024
3e1f021
remove symmetry warning pytest skips.
j-c-c Sep 11, 2024
d5622fb
remove unnecesary plt.close()
j-c-c Sep 11, 2024
d9c7f6e
unused import
j-c-c Sep 11, 2024
c8ca38e
Remove useless test case.
j-c-c Sep 11, 2024
377991a
migrate osx_arm CI job to run native python/pip
garrettwrong Sep 13, 2024
d1b9feb
Remove x86_64 doc updates
garrettwrong Sep 13, 2024
fe82488
Use 3.11 on osx_arm, default was 3.12
garrettwrong Sep 13, 2024
c90d2a5
use default osx shell
garrettwrong Sep 13, 2024
efa5cc5
adjust a few tests for osx arm
garrettwrong Sep 13, 2024
6b9a2df
convert simulation tests to np.testing.assert_allclose
garrettwrong Sep 13, 2024
00f0a41
Another test file tweak for arm64
garrettwrong Sep 13, 2024
372545d
loosen FLE for arm a little more
garrettwrong Sep 13, 2024
c094e56
adjust comment
garrettwrong Sep 13, 2024
19e8616
mean alpha angles
garrettwrong Sep 6, 2024
f9819d3
restore old euler to rotation code
garrettwrong Sep 6, 2024
badce6d
incorrect tic width
garrettwrong Sep 7, 2024
9bfd757
hist width and peak spread patches
garrettwrong Sep 8, 2024
ddb7fed
common line bug fixes and cleanup
garrettwrong Sep 10, 2024
1d8c4d7
after compat changes, restore zyz convention
garrettwrong Sep 11, 2024
b96265f
add sync param docstring
garrettwrong Sep 11, 2024
89ff293
stash debugging work S and Rots, match up to CL mat
garrettwrong Sep 13, 2024
97bc630
cleanup rotation comparison debug, adds logger
garrettwrong Sep 16, 2024
3638325
Fix reflection bug in nearest_rotation
garrettwrong Sep 16, 2024
661f121
revert sync3n test
garrettwrong Sep 16, 2024
1559eaa
more cleanup
garrettwrong Sep 16, 2024
a7b7f92
clarify nearest_rotation docstring
garrettwrong Sep 17, 2024
ab409a3
Add init
j-c-c Sep 14, 2023
e28d110
saff_kuijlaars shpere points.
j-c-c Sep 15, 2023
4ef2577
saff_kuijlaars and mark_equators partial.
j-c-c Sep 19, 2023
436e153
Mark top views and equators. Generate inplane rotations.
j-c-c Sep 22, 2023
b649a9f
match matlab MarkEquators
j-c-c Dec 1, 2023
24341b1
relative rotations.
j-c-c Dec 4, 2023
d147304
generate_commonline_indices
j-c-c Dec 6, 2023
1ab71bc
generate_gs. Partial self-commonline lookup.
j-c-c Dec 11, 2023
c7b5e66
More self-commonline stuff.
j-c-c Dec 15, 2023
1176d5a
circ_seq. more scl_lookup_data.
j-c-c Feb 26, 2024
2299921
Finish scl_lookup
j-c-c Feb 29, 2024
44c21c9
all_eq_measures and partial compute_scl_scores
j-c-c Mar 8, 2024
8ed5011
compute_scl_scores. Enforce aspire-python cl correlation convention, …
j-c-c Mar 14, 2024
8c8dffe
precompute shifted polar fourier. Confirm corrs reshape.
j-c-c Mar 14, 2024
d62ed40
add generate_scl_scores_idx_map method.
j-c-c Mar 15, 2024
3d649b5
remove unused variables.
j-c-c Mar 15, 2024
e01a7d8
completed compute_cl_scores
j-c-c Mar 29, 2024
6f2283e
global J sync complete
j-c-c Apr 11, 2024
f9d5f3e
beginning of color sync
j-c-c Apr 12, 2024
06163b9
_match_colors function.
j-c-c Apr 17, 2024
0447ade
mult_cmat_by_vec function
j-c-c Apr 17, 2024
00d5d3b
fix loop indices and lambda function.
j-c-c Apr 18, 2024
ecb2935
Add _unmix_colors function.
j-c-c Apr 19, 2024
47adce3
Add partial sync_signs.
j-c-c Apr 19, 2024
50f355a
syncSigns method.
j-c-c Apr 25, 2024
7ff6b51
max_shift_1d, mask parameter.
j-c-c May 1, 2024
ca2e464
Fix bugs. Output rotations matching matlab sometimes. Need to stabili…
j-c-c May 8, 2024
6548f50
Stable J_sync and SVDs.
j-c-c May 9, 2024
430b324
Add initial testing.
j-c-c May 10, 2024
1c32b2f
unused imports
j-c-c May 10, 2024
ca316f8
Add offsets to test.
j-c-c May 10, 2024
e91e266
Make non-user functions private.
j-c-c May 13, 2024
b0dc70f
Reorganize Algo Sections.
j-c-c May 13, 2024
887e882
Test for global_J_sync.
j-c-c May 14, 2024
c3cd171
Fix J-sync test logic.
j-c-c May 14, 2024
047febe
Seed initial vec for scipy eigs. single triplet J-sync test. Color sy…
j-c-c May 17, 2024
f839aa3
unused import
j-c-c May 17, 2024
dd032c2
test for sign sync.
j-c-c May 17, 2024
3f75bb1
adjust angular distance tol.
j-c-c May 20, 2024
06ba076
Test self-commonline score.
j-c-c May 20, 2024
f4ccf60
Refactor to use n_theta other than 360.
j-c-c May 23, 2024
8314035
add documentation.
j-c-c May 31, 2024
c50d136
Self-review: Use DnSymmetryGroup for gs, Remove matlab pf convention,…
j-c-c Jun 3, 2024
359e137
Add logging to main functions.
j-c-c Jun 5, 2024
bf26bb6
remove unnecesary mod
j-c-c Jun 10, 2024
690a56b
Revert eigs to use largest real. black.
j-c-c Jun 10, 2024
d95f328
Add dtype pass-through checks to tests.
j-c-c Jun 10, 2024
59e7072
remove einsum for Garrett
j-c-c Jun 17, 2024
6bdbb77
Remove more einsums.
j-c-c Jun 17, 2024
c2993c9
line wrap docstrings
j-c-c Jun 17, 2024
4b821ee
remove debug comment.
j-c-c Jun 17, 2024
9ec4fc3
remove CAPS
j-c-c Jul 22, 2024
990ed2f
reshape pf.shifted
j-c-c Jul 22, 2024
cdee9fd
use count_nonzero instead of sum
j-c-c Jul 22, 2024
43a53ca
fix typos.
j-c-c Jul 22, 2024
cd0563a
Fix comment to use n_theta.
j-c-c Jul 23, 2024
91925f9
reshape cl_angles. Remove unused attribute self.cl_angles*.
j-c-c Jul 30, 2024
698fe35
replace loop with broadcast.
j-c-c Jul 30, 2024
1ca164f
Clean up _all_eq_measures using broadcasting.
j-c-c Jul 30, 2024
df014a1
Vectorize _compute_cl_scores.
j-c-c Jul 30, 2024
90bcb23
Broadcast when computing Rijs.
j-c-c Aug 5, 2024
f30a8e4
loop -> broadcast
j-c-c Aug 5, 2024
0ee84ce
rename func
j-c-c Aug 5, 2024
b5aa47c
_compare_rots docstring and broadcast.
j-c-c Aug 5, 2024
f0eb444
broadcasting
j-c-c Aug 6, 2024
b1158c1
Reshape arrays and use cleaner indexing.
j-c-c Aug 6, 2024
a3b4d2d
more indexing cleanup
j-c-c Aug 6, 2024
8b7373d
remove unused variable
j-c-c Aug 6, 2024
e951ce9
circ_seq value check
j-c-c Aug 6, 2024
10acc78
compute_scl_scores: Replace loop with vectorized operations.
j-c-c Aug 8, 2024
eed8b14
Add doc io
j-c-c Aug 13, 2024
326f949
Documentation for mark_equators.
j-c-c Aug 13, 2024
e5eaafb
Clean up mark_equators
j-c-c Aug 14, 2024
1f9395e
Add documentation to _generate_commonline_indices.
j-c-c Aug 14, 2024
342df2f
doubles for expensive testing
j-c-c Aug 14, 2024
610c56e
Add detail to test comment about candidate rotation parameters.
j-c-c Aug 14, 2024
b74aff6
cache source in test
j-c-c Aug 14, 2024
0529b52
Use randomly ordered Rijs for J-sync tests
j-c-c Aug 14, 2024
1661984
randomize color sync test
j-c-c Aug 14, 2024
951b369
Add documentation to color_sync test.
j-c-c Aug 15, 2024
76d8f8c
remove F-order flatten
j-c-c Aug 26, 2024
afb5753
Reword docstring
j-c-c Aug 26, 2024
62de30c
Add docstrings
j-c-c Aug 27, 2024
c24609e
Use number rays in 2 degrees instead 2 pf rays in all_eq_measures.
j-c-c Sep 5, 2024
fc43511
Add comment about necessary ordering of D2 symmetry group elements.
j-c-c Sep 5, 2024
97e7efc
black
j-c-c Sep 5, 2024
59db8a6
revert all_eq_measures search radius.
j-c-c Sep 5, 2024
758885b
black
j-c-c Sep 5, 2024
019b69a
Add seed to sporadically failing test.
j-c-c Sep 10, 2024
0f498f4
revert search radius
j-c-c Sep 10, 2024
e5f61a5
typo
j-c-c Sep 13, 2024
a3be20b
Use np.nonzero instead of np.where.
j-c-c Sep 13, 2024
01bc734
lowercase
j-c-c Sep 13, 2024
3bac984
use ints
j-c-c Sep 13, 2024
d102991
input/output docs
j-c-c Sep 16, 2024
ee0e152
break up _sync_signs
j-c-c Sep 17, 2024
4389bf7
Rewrite docstring
j-c-c Sep 17, 2024
7eea305
resolve numpy deprecation warning.
j-c-c Sep 17, 2024
81f2687
try diff seed
j-c-c Sep 17, 2024
8ccada5
switch test to doubles to diagnose osx-arm failures.
j-c-c Sep 18, 2024
b5856a1
Remove eq_idx
j-c-c Sep 18, 2024
cda5e30
Add descript of eq2eq table to docs.
j-c-c Sep 18, 2024
38d4e51
add more documentation.
j-c-c Sep 19, 2024
de075e0
Always doubles for scipy LinearOperator
j-c-c Sep 19, 2024
f31d317
revert test to singles
j-c-c Sep 19, 2024
80d192c
fix another bounds bug, triangle score ls
garrettwrong Sep 23, 2024
fde6ac2
Bump version: 0.12.3 → 0.13.0
garrettwrong Sep 26, 2024
33aa87d
use 50 as mean maxiters, match matlab
garrettwrong Sep 27, 2024
ba2ce1d
convert error raise to warning
garrettwrong Sep 27, 2024
39dc51f
fixup None logic for checkpoint disable
garrettwrong Sep 27, 2024
293de9f
fixup unittest, no longer raising
garrettwrong Sep 27, 2024
1e33ea9
Resolve matplotlib warning.
j-c-c Oct 1, 2024
13d4c6f
Increase FLE test tolerance to 30%
j-c-c Oct 1, 2024
5123987
typo in B0 formula
garrettwrong Oct 1, 2024
599b5f7
log diagnotics
garrettwrong Oct 1, 2024
dad81b6
sanity check curve_fit start values
garrettwrong Oct 1, 2024
529bc69
For now use default initial soln for Swt curve fitting
garrettwrong Oct 2, 2024
7228ee0
leave matlab based code as comment for now
garrettwrong Oct 2, 2024
98e0bcd
minimal changes to estimate_shifts.
j-c-c Sep 23, 2024
06cf57c
clean up indexing
j-c-c Sep 24, 2024
d71d1bb
use mean 2D distance in test.
j-c-c Sep 24, 2024
26f3c8d
add more estimate shifts tests.
j-c-c Sep 30, 2024
21a1eea
Module scope. Estimate rotations once per module. Adjust tolerance.
j-c-c Sep 30, 2024
c577239
One more deepcopy.
j-c-c Sep 30, 2024
f3056c3
test_coef dtype patch for osx.
j-c-c Sep 30, 2024
1d7e33e
update code cov to token auth
garrettwrong Oct 4, 2024
a01d211
minimal changes to restore simulation gallery for release
garrettwrong Oct 8, 2024
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.12.3
current_version = 0.13.0
commit = True
tag = True

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/long_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: ASPIRE Python Long Running Test Suite

on:
push:
branches:
- 'main'
- 'develop'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
expensive_tests:
runs-on: self-hosted
# Only run on review ready pull_requests
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
timeout-minutes: 360
steps:
- uses: actions/checkout@v4
Expand All @@ -33,8 +33,9 @@ jobs:
cat ${WORK_DIR}/config.yaml
- name: Run
run: |
export OMP_NUM_THREADS=1
ASPIREDIR=${{ env.WORK_DIR }} python -c \
"import aspire; print(aspire.config['ray']['temp_dir'])"
ASPIREDIR=${{ env.WORK_DIR }} python -m pytest -m "expensive" --durations=0
ASPIREDIR=${{ env.WORK_DIR }} python -m pytest -n8 -m "expensive" --durations=0
- name: Cleanup
run: rm -rf ${{ env.WORK_DIR }}
28 changes: 11 additions & 17 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
run: tox --skip-missing-interpreters false -e py${{ matrix.python-version }}-${{ matrix.pyenv }}
- name: Upload Coverage to CodeCov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

conda-build:
needs: check
Expand Down Expand Up @@ -147,14 +149,17 @@ jobs:
echo "Stash the WORK_DIR to GitHub env so we can clean it up later."
echo "WORK_DIR=${WORK_DIR}" >> $GITHUB_ENV
echo -e "ray:\n temp_dir: ${WORK_DIR}\n" > ${WORK_DIR}/config.yaml
echo -e "common:\n cache_dir: ${CI_CACHE_DIR}\n" >> ${WORK_DIR}/config.yaml
echo -e "common:" >> ${WORK_DIR}/config.yaml
echo -e " cache_dir: ${CI_CACHE_DIR}" >> ${WORK_DIR}/config.yaml
echo -e " numeric: cupy" >> ${WORK_DIR}/config.yaml
echo -e " fft: cupy\n" >> ${WORK_DIR}/config.yaml
echo "Log the config: ${WORK_DIR}/config.yaml"
cat ${WORK_DIR}/config.yaml
- name: Run
run: |
ASPIREDIR=${{ env.WORK_DIR }} python -c \
"import aspire; print(aspire.config['ray']['temp_dir'])"
ASPIREDIR=${{ env.WORK_DIR }} python -m pytest --durations=50
ASPIREDIR=${{ env.WORK_DIR }} PYTHONWARNINGS=error python -m pytest --durations=50
- name: Cache Data
run: |
ASPIREDIR=${{ env.WORK_DIR }} python -c \
Expand Down Expand Up @@ -219,29 +224,18 @@ jobs:
retention-days: 7

osx_arm:
defaults:
run:
shell: bash -l {0}
needs: check
runs-on: macos-14
# Run on every code push, but only on review ready PRs
if: ${{ github.event_name == 'push' || github.event.pull_request.draft == false }}
steps:
- uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2.3.0
- uses: actions/setup-python@v5
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: '3.8'
activate-environment: aspire
environment-file: environment-accelerate.yml
auto-activate-base: false
- name: Complete Install and Log Environment ${{ matrix.os }} Python ${{ matrix.python-version }}
python-version: '3.11'
- name: Complete Install and Log Environment
run: |
conda info
conda list
conda install pyshtools # debug depends issues
python --version
pip install -e ".[dev]" # install aspire
pip freeze
- name: Test
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ recursive-include docs *.rst
recursive-include docs Makefile
recursive-include docs *.sh
recursive-include src *.conf
recursive-include src *.cu
recursive-include src *.yaml
prune docs/build
prune docs/source
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5657281.svg)](https://doi.org/10.5281/zenodo.5657281)
[![Downloads](https://static.pepy.tech/badge/aspire/month)](https://pepy.tech/project/aspire)

# ASPIRE - Algorithms for Single Particle Reconstruction - v0.12.3
# ASPIRE - Algorithms for Single Particle Reconstruction - v0.13.0

The ASPIRE-Python project supersedes [Matlab ASPIRE](https://github.com/PrincetonUniversity/aspire).

Expand All @@ -20,7 +20,7 @@ For more information about the project, algorithms, and related publications ple
Please cite using the following DOI. This DOI represents all versions, and will always resolve to the latest one.

```
ComputationalCryoEM/ASPIRE-Python: v0.12.3 https://doi.org/10.5281/zenodo.5657281
ComputationalCryoEM/ASPIRE-Python: v0.13.0 https://doi.org/10.5281/zenodo.5657281

```

Expand All @@ -37,11 +37,7 @@ install `aspire` safely in that environment.

If you are unfamiliar with `conda`, the
[Miniconda](https://docs.conda.io/en/latest/miniconda.html)
distribution for `x86_64` is recommended. For Apple silicon to use
the osx-arm platform, patching and building some dependencies from
source is currently required. The Intel `osx-64` install is still
preferred even for Apple silicon users, otherwise [notes are
provided.](https://github.com/ComputationalCryoEM/ASPIRE-Python/discussions/969)
distribution for `x86_64` is recommended.

Assuming you have `conda` and a compatible system, the following steps
will checkout current code release, create an environment, and install
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version = "0.12.3"
release = version = "0.13.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Aspire v0.12.3
Aspire v0.13.0
==============

Algorithms for Single Particle Reconstruction
Expand Down
37 changes: 13 additions & 24 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ to view Conda's installation instructions.
.. note:: If you're not sure which distribution is right for you, go
with `Miniconda <https://conda.io/miniconda.html>`__

.. note:: For Apple silicon to use the osx-arm platform, patching and
building some dependencies from source is currently required. The
Intel ``osx-64`` install is still preferred even for Apple silicon
users, otherwise `notes are
provided. <https://github.com/ComputationalCryoEM/ASPIRE-Python/discussions/969>`_

Getting Started - Installation
************************************

Expand Down Expand Up @@ -129,25 +123,17 @@ an M1 laptop:
Installing GPU Extensions
*************************

ASPIRE does support GPUs, depending on several external packages. The
collection of GPU extensions can be installed using ``pip``.
Extensions are grouped based on CUDA versions. To find the CUDA
driver version, run ``nvidia-smi`` on the intended system.
ASPIRE does support using a GPU, depending on several external
packages. The collection of GPU extensions can be installed using
``pip``. Extensions are grouped based on CUDA versions. To find the
CUDA driver version, run ``nvidia-smi`` on the intended system.

.. list-table:: CUDA GPU Extension Versions
:widths: 25 25
:header-rows: 1

* - CUDA Version
- ASPIRE Extension
* - 10.2
- gpu-102
* - 11.0
- gpu-110
* - 11.1
- gpu-111
* - >=11.2
- gpu-11x
* - >=12
- gpu-12x

Expand All @@ -164,12 +150,15 @@ the command below would install GPU packages required for ASPIRE.


By default if the required GPU extensions are correctly installed,
ASPIRE should automatically begin using the GPU for select components
(such as those using ``nufft``).

Because GPU extensions depend on several third party packages and
libraries, we can only offer limited support if one of the packages
has a problem on your system.
ASPIRE should automatically begin using the GPU calls to our ``nufft`` module.

Using GPU in other areas of the code is still an experimental feature
and requires a minor configuration setting to enable ``cupy``. See the
:ref:`sphx_glr_auto_tutorials_configuration.py` for details. Because
GPU extensions depend on several third party softwares and machines
vary wildly, we can only offer limited support if one of the packages
has a problem on your system. We are currently expanding GPU code
coverage.

Generating Documentation
************************
Expand Down
1 change: 0 additions & 1 deletion environment-accelerate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ channels:
dependencies:
- pip
- python=3.8
- pyshtools
- numpy=1.24.1
- scipy=1.10.1
- scikit-learn
Expand Down
19 changes: 12 additions & 7 deletions gallery/experiments/experimental_abinitio_pipeline_10081.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@

# Create a source object for the experimental images
src = RelionSource(
starfile_in, pixel_size=pixel_size, max_rows=n_imgs, data_folder=data_folder
starfile_in,
pixel_size=pixel_size,
max_rows=n_imgs,
data_folder=data_folder,
symmetry_group="C4",
)

# Downsample the images
Expand Down Expand Up @@ -115,12 +119,13 @@
# Volume Reconstruction
# ----------------------
#
# Using the oriented source, attempt to reconstruct a volume.
# Since this is a Cn symmetric molecule, as indicated by
# ``symmetry="C4"`` above, the ``avgs`` images set will be repeated
# for each of the 3 additional rotations during the back-projection
# step. This boosts the effective number of images used in the
# reconstruction from ``n_classes`` to ``4*n_classes``.
# Using the oriented source, attempt to reconstruct a volume. Since
# this is a Cn symmetric molecule, as specified by ``RelionSource(...,
# symmetry_group="C4", ...)``, the ``symmetry_group`` source attribute
# will flow through the pipeline to ``avgs``. Then each image will be
# repeated for each of the 3 additional rotations during
# back-projection. This boosts the effective number of images used in
# the reconstruction from ``n_classes`` to ``4*n_classes``.

logger.info("Begin Volume reconstruction")

Expand Down
21 changes: 10 additions & 11 deletions gallery/experiments/simulated_abinitio_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,9 @@
# ---------------
# Start with the hi-res volume map EMDB-2660 sourced from EMDB,
# https://www.ebi.ac.uk/emdb/EMD-2660, and dowloaded via ASPIRE's downloader utility.
og_v = emdb_2660()
og_v = emdb_2660().astype(np.float64)
logger.info("Original volume map data" f" shape: {og_v.shape} dtype:{og_v.dtype}")

logger.info(f"Downsampling to {(img_size,)*3}")
v = og_v.downsample(img_size)
L = v.resolution


# Then create a filter based on that variance
# This is an example of a custom noise profile
Expand All @@ -70,15 +66,15 @@ def noise_function(x, y):
# White
f1 = noise_variance
# Violet-ish
f2 = noise_variance * (x * x + y * y) / L * L
f2 = noise_variance * (x * x + y * y) / img_size * img_size
return (alpha * f1 + beta * f2) / 2.0


custom_noise = CustomNoiseAdder(noise_filter=FunctionFilter(noise_function))

logger.info("Initialize CTF filters.")
# Create some CTF effects
pixel_size = 5 * 65 / img_size # Pixel size of the images (in angstroms)
pixel_size = og_v.pixel_size # Pixel size (in angstroms)
voltage = 200 # Voltage (in KV)
defocus_min = 1.5e4 # Minimum defocus value (in angstroms)
defocus_max = 2.5e4 # Maximum defocus value (in angstroms)
Expand All @@ -94,13 +90,16 @@ def noise_function(x, y):

# Finally create the Simulation
src = Simulation(
L=v.resolution,
n=num_imgs,
vols=v,
vols=og_v,
noise_adder=custom_noise,
unique_filters=ctf_filters,
dtype=v.dtype,
dtype=np.float64,
)

# Downsample
src = src.downsample(img_size).cache()

# Peek
if interactive:
src.images[:10].show()
Expand All @@ -115,7 +114,7 @@ def noise_function(x, y):

# Plot the noise profile for inspection
if interactive:
plt.imshow(aiso_noise_estimator.filter.evaluate_grid(L))
plt.imshow(aiso_noise_estimator.filter.evaluate_grid(img_size))
plt.show()

# Peek, what do the whitened images look like...
Expand Down
2 changes: 1 addition & 1 deletion gallery/tutorials/aspire_introduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def noise_function(x, y):

# Generate several CTFs.
ctf_filters = [
RadialCTFFilter(pixel_size=5, defocus=d)
RadialCTFFilter(pixel_size=vol_ds.pixel_size, defocus=d)
for d in np.linspace(defocus_min, defocus_max, defocus_ct)
]

Expand Down
30 changes: 30 additions & 0 deletions gallery/tutorials/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,36 @@
time.sleep(1)
print("Done Loop 2\n")

# %%
# Enabling GPU Acceleration
# -------------------------
# Enabling GPU acceleration requires installing supporting software
# packages and small config changes. Installing the supporting
# software is most easily accomplished by installing ASPIRE with one
# of the published GPU extensions, for example ``pip install
# "aspire[dev,gpu_12x]"``. Once the packages are installed users
# should find that the NUFFT calls are automatically running on the
# GPU. Additional acceleration is achieved by enabling `cupy` for
# `numeric` and `fft` components.
#
# .. code-block:: yaml
#
# common:
# # numeric module to use - one of numpy/cupy
# numeric: cupy
# # fft backend to use - one of pyfftw/scipy/cupy/mkl
# fft: cupy
#
# Alternatively, like other config options, this can be changed
# dynamically with code.
#
# .. code-block:: python
#
# from aspire import config
#
# config["common"]["numeric"] = "cupy"
# config["common"]["fft"] = "cupy"
#

# %%
# Resolution
Expand Down
2 changes: 1 addition & 1 deletion gallery/tutorials/pipeline_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
defocus_ct = 7

ctf_filters = [
RadialCTFFilter(pixel_size=5, defocus=d)
RadialCTFFilter(pixel_size=vol.pixel_size, defocus=d)
for d in np.linspace(defocus_min, defocus_max, defocus_ct)
]

Expand Down
4 changes: 3 additions & 1 deletion gallery/tutorials/tutorials/cov3d_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
L=img_size,
n=num_imgs,
vols=vols,
unique_filters=[RadialCTFFilter(defocus=d) for d in np.linspace(1.5e4, 2.5e4, 7)],
unique_filters=[
RadialCTFFilter(pixel_size=10, defocus=d) for d in np.linspace(1.5e4, 2.5e4, 7)
],
dtype=dtype,
)

Expand Down
Loading
Loading