Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
429 commits
Select commit Hold shift + click to select a range
2d7977e
rots_symm[order - 1] --> rots_symm[-1]
j-c-c Jun 28, 2022
b49b334
more J_conjugate
j-c-c Jun 28, 2022
09818a0
change angle tolerance for self common line detection to 5 degrees
j-c-c Jun 28, 2022
1e59454
remove parens
j-c-c Jun 29, 2022
321e17a
replace pairs.index() with algebraic pairs_to_linear() function
j-c-c Jun 29, 2022
bde0434
unit test for pairs_to_linear() function
j-c-c Jun 29, 2022
c113a7b
refactor ainner to handle complex numbers
j-c-c Jun 29, 2022
6cd68f7
typo
j-c-c Jul 1, 2022
f14b6b8
resolve merge conflicts. fix tests.
j-c-c Jul 1, 2022
6f36875
Merge remote-tracking branch 'origin/develop' into in_plane_rotations
j-c-c Jul 1, 2022
bb249d8
Merge pull request #645 from ComputationalCryoEM/appletest_629
garrettwrong Jul 7, 2022
8cd54f7
Update latest flake8 bugbear finds re B023 in lambda functions
garrettwrong Jul 7, 2022
e7d89ef
Merge pull request #653 from garrettwrong/fixup_flakes
garrettwrong Jul 7, 2022
bb8077c
Merge pull request #649 from ComputationalCryoEM/complex_norm_646
j-c-c Jul 11, 2022
fd2e13a
Remove Simulation and Crop from Getting Started.
j-c-c Jul 11, 2022
8856d6e
Add denoise to quickstart.rst
j-c-c Jul 11, 2022
4b7f838
add extract-particles to quickstart.rst
j-c-c Jul 12, 2022
63bf677
Add orient3d to quickstart.rst. Add bibtex entry for common lines pub…
j-c-c Jul 12, 2022
ccd5881
changed default to None (from zero) for clarity.
j-c-c Jul 12, 2022
42208e6
Added preprocess command to quickstart.rst
j-c-c Jul 12, 2022
9e93665
Filter.sign method
j-c-c Jul 12, 2022
3f85827
make Filter.sign a property. Test for Filter.sign.
j-c-c Jul 13, 2022
304280d
replace use of LamdaFilter() with f.sign
j-c-c Jul 13, 2022
94c86c7
docstring
j-c-c Jul 13, 2022
c81b7fa
change indexing from F to C
j-c-c Jul 18, 2022
908263b
Remove peak parameter, use tuples for gaussian_2d and 3d parameters, …
j-c-c Jul 18, 2022
f79f063
make gaussian_1d/3d available from utils module
j-c-c Jul 18, 2022
a651b1c
update gaussian_2d in tests/test_adaptive_support.py
j-c-c Jul 18, 2022
b4d990f
Reorder quickstart to align with reconstruction pipeline order.
j-c-c Jul 19, 2022
4e5fec5
Fix `Image.set_metadata()` bug (#648)
chris-langfield Jul 21, 2022
42f638e
Merge pull request #656 from ComputationalCryoEM/filter_sign_method
j-c-c Jul 21, 2022
550dd42
typos. small changes.
j-c-c Jul 21, 2022
d216921
remove --help
j-c-c Jul 21, 2022
a81cd3f
set dtype to doubles in cyclic_rotations
j-c-c Jul 25, 2022
8a76f3a
call static method from Class instead of Instance.
j-c-c Jul 25, 2022
271cb92
typo
j-c-c Jul 25, 2022
a4619b8
remove 2root2 max_shift scaling factor
j-c-c Jul 26, 2022
81fd158
Merge remote-tracking branch 'origin/develop' into relative_viewing_d…
j-c-c Jul 26, 2022
b7fef70
removed unused corrs_stats and shift_stats values
j-c-c Jul 26, 2022
3a0b458
change X,Y to theta_full, theta_half
j-c-c Jul 26, 2022
a7f9b65
Cast vols on mismatch Simulation dtype
garrettwrong Jul 27, 2022
1496e4e
Merge pull request #643 from garrettwrong/expose_rots_shifts
garrettwrong Jul 27, 2022
bab93f3
newline at end of file
j-c-c Jul 27, 2022
c92a47c
using scalar for sigma in gallery.
j-c-c Jul 27, 2022
0b70d9f
added detail to comment for angle range of self common-lines
j-c-c Jul 27, 2022
ec22972
reformulate unsigned angle differences
j-c-c Jul 27, 2022
6aa0e8b
remove comments
j-c-c Jul 27, 2022
9cc5c1f
added comment indicating that self.pf is in column major order
j-c-c Jul 27, 2022
57a0af2
added comment to note that _global_J_sync() does not rely on cyclic o…
j-c-c Jul 27, 2022
74bb2e1
replace hardcoded value with expression
j-c-c Jul 27, 2022
1e823bf
initialize self common lines matrix closer to loop.
j-c-c Jul 27, 2022
bddde08
added LaTex math equations to gaussian_ function documentation.
j-c-c Jul 28, 2022
2fe4e53
test for gaussian_ function scalar sigma value
j-c-c Jul 28, 2022
36724a2
Merge pull request #661 from garrettwrong/fix_vols_dtype
garrettwrong Jul 28, 2022
bf1fd27
Merge pull request #655 from ComputationalCryoEM/click_commands_543
j-c-c Jul 28, 2022
0378b15
Merge pull request #657 from ComputationalCryoEM/gaussian_funcs_603
j-c-c Jul 28, 2022
1f36d94
Fixup my bad volume type mismatch PR
garrettwrong Aug 1, 2022
6ddf475
review comment
garrettwrong Aug 1, 2022
c940870
Merge pull request #665 from ComputationalCryoEM/shame_on_me
garrettwrong Aug 1, 2022
7cfcda8
implement basic multi processing.
garrettwrong Jun 2, 2022
d6ab74a
stub in mp utils
garrettwrong Jun 3, 2022
0cf28e7
test averager2d w/ threadpool
garrettwrong Jun 6, 2022
c6ef818
stashing
garrettwrong Jun 14, 2022
12eb413
stashing with first attempt at Ray Pool
garrettwrong Jul 14, 2022
3a2428b
ray BFS stash
garrettwrong Jul 14, 2022
579bac8
tox cleanup
garrettwrong Jul 15, 2022
1a2d699
cleanup prior mp work
garrettwrong Jul 19, 2022
c4d90d2
continue to cleanup prior mp work
garrettwrong Jul 19, 2022
fd255d7
add ray depends
garrettwrong Jul 19, 2022
0b5a827
n mp should be an int
garrettwrong Jul 19, 2022
d6a9046
disable auto for ci run
garrettwrong Jul 19, 2022
0f37bf3
debug
garrettwrong Jul 19, 2022
e749957
my favorite bug
garrettwrong Jul 19, 2022
b37dd41
patch up unit tests and gallery to admit ray mp as default
garrettwrong Jul 22, 2022
44ac96c
rm diagnostics from RC
garrettwrong Jul 26, 2022
a0afb4c
factor RC into own file
garrettwrong Jul 26, 2022
d638382
cleanup RC args and docstring
garrettwrong Jul 26, 2022
1243f3b
fixup tmp var names in BFSRC align
garrettwrong Jul 26, 2022
411d82a
cleanup mp loop towards ray pool.map
garrettwrong Jul 26, 2022
7679533
Ray pool the `averager` methods
garrettwrong Jul 27, 2022
bd8c559
add missing util docstring
garrettwrong Jul 27, 2022
a564ae0
fixup docstrings
garrettwrong Jul 27, 2022
426db94
mmmk
garrettwrong Jul 27, 2022
0448cb1
flow num_procs through all averager subclasses
garrettwrong Jul 28, 2022
835d81e
found dead code line
garrettwrong Aug 2, 2022
36afcdb
Merge pull request #670 from ComputationalCryoEM/rm_dead_line
garrettwrong Aug 2, 2022
b040911
Deprecate Azure OSX 10.15 CI in favor of OSX11
garrettwrong Aug 3, 2022
5226ce2
Add CTFFilter population feedback/errors.
garrettwrong Jul 7, 2022
1194bd8
Add unit test for empty phase flip
garrettwrong Jul 8, 2022
4b0c727
Add unit test for incompleted CTF params
garrettwrong Jul 8, 2022
9fa5b29
Review remarks
garrettwrong Jul 11, 2022
4432828
revert getter to list
garrettwrong Jul 13, 2022
bd25eda
black updates
garrettwrong Aug 2, 2022
d1f55f7
Warn instead of raise on phase_flip without CTFFilters
garrettwrong Aug 3, 2022
97cdabd
minor docstring fixes
garrettwrong Aug 3, 2022
e6eea87
Merge pull request #673 from ComputationalCryoEM/osx_ci_update
garrettwrong Aug 4, 2022
6995e5b
Phase flip applies to all unique filters. Reverts prior change
garrettwrong Aug 4, 2022
0cf1b32
Fix unit test log str cmp
garrettwrong Aug 4, 2022
d8b7387
address review suggestions, rename auto->None
garrettwrong Aug 4, 2022
cc50234
Merge remote-tracking branch 'origin/develop' into mp_cls_avg
garrettwrong Aug 4, 2022
83eba0d
Merge pull request #654 from garrettwrong/ctf_or_bust
garrettwrong Aug 4, 2022
3bb057b
Add randomize class selector and selector selection
garrettwrong Aug 1, 2022
acd9148
Fixup docstring lens
garrettwrong Aug 1, 2022
0266d3c
Add some tests for user supplied selection functions
garrettwrong Aug 1, 2022
b563a48
indexing typo
garrettwrong Aug 1, 2022
71baea0
convert functional implementation to classes
garrettwrong Aug 5, 2022
f3d9d48
Provide way for user to override ray's tmp dir
garrettwrong Aug 8, 2022
ef40b04
cover new branch with unit test
garrettwrong Aug 8, 2022
2292080
rm stray comment
garrettwrong Aug 8, 2022
ee04ec5
Use linspace to calculate theta values. Was incorrectly using range.
j-c-c Aug 9, 2022
a873dab
method to calculate angular distance between two rotation matrices.
j-c-c Aug 9, 2022
89dd89a
replace nchoose2 with len(pairs)
j-c-c Aug 9, 2022
a8aee01
review comment, too short case
garrettwrong Aug 10, 2022
5288b34
assign selection to class attribute
garrettwrong Aug 10, 2022
0bcd972
update tutorial with to explicitly call class selector for demo
garrettwrong Aug 10, 2022
0ccdf27
fix common-line to angle conversion
j-c-c Aug 10, 2022
446f0ed
testRelativeRotations tests for mean angular distance between estimat…
j-c-c Aug 10, 2022
6538982
use mean angular distance for testSelfRelativeRotations.
j-c-c Aug 10, 2022
71a4bfd
Merge pull request #660 from garrettwrong/mp_cls_avg
garrettwrong Aug 11, 2022
2d67cd3
Standardize `evaluate` and `evaluate_t` behavior in bases (#618)
chris-langfield Aug 11, 2022
4322b09
initial lbound component checks
garrettwrong Aug 3, 2022
44ef870
speedup testRIRDevelBisp
garrettwrong Aug 3, 2022
855595b
speedup testRIRLegacy and testRIRsk
garrettwrong Aug 3, 2022
0249ab8
cover new branches with unit tests
garrettwrong Aug 9, 2022
5af43cb
fixup intiial review comments
garrettwrong Aug 10, 2022
aa08663
refactor fspca_components default logic
garrettwrong Aug 10, 2022
6c26b7f
spelling
garrettwrong Aug 11, 2022
4d13d56
replace relativeViewingDirection test with angular distance between s…
j-c-c Aug 15, 2022
ec91a89
upper bound based on resolution
j-c-c Aug 17, 2022
94344fb
Merge pull request #675 from garrettwrong/fspca_components_lower_boun…
garrettwrong Aug 18, 2022
aa3efc0
Merge branch 'develop' into class_selection
garrettwrong Aug 18, 2022
f098b24
test regression combining 667 and 675
garrettwrong Aug 18, 2022
4866012
set max_angle_diff to be within a factor of 1/L of 180.
j-c-c Aug 18, 2022
b771dc1
test taht relative viewing direction estimates are approximately rank…
j-c-c Aug 18, 2022
e7d42e7
move angle_dist method to utils/rotation.py. Added docstring.
j-c-c Aug 18, 2022
c2831e2
Merge pull request #667 from ComputationalCryoEM/class_selection
garrettwrong Aug 18, 2022
d1e9d19
angle_dist test.
j-c-c Aug 18, 2022
0749532
Initial plumb `batch_size` through rir_class2d and fspca.
garrettwrong Aug 18, 2022
863859f
set angle res factor to 2.
j-c-c Aug 19, 2022
dfe039a
loosen tolerance on common lines test. exclude indices where ground t…
j-c-c Aug 19, 2022
f3c74db
Merge pull request #594 from ComputationalCryoEM/relative_viewing_dir…
j-c-c Aug 19, 2022
c30a890
Add `crop_pad_3d` with tests (#679)
chris-langfield Aug 22, 2022
a65470c
update azure pipeline ubuntu image versions
garrettwrong Aug 22, 2022
63e0bd7
Merge pull request #683 from ComputationalCryoEM/upgrade_ubuntu_azure_ci
garrettwrong Aug 24, 2022
95f85f8
resolve merge conflicts.
j-c-c Aug 24, 2022
8e5ced2
reconciling gaussian_3d indexing with commonlines tests.
j-c-c Aug 29, 2022
118eb78
fix testGaussian3D indexing and parameterize over index order.
j-c-c Aug 30, 2022
b559061
Merge branch 'common_lines_symmetry' into in_plane_rotations
garrettwrong Aug 30, 2022
93b80da
replace deprecated buildCyclicRotations with cyclic_rotations method.
j-c-c Aug 30, 2022
e6a6d0f
normalize pf rays using NumPy operations instead of loop
j-c-c Aug 31, 2022
f80bca1
cleanup existing test_covar2d
garrettwrong Aug 31, 2022
548d4ee
split batched cov2d test into CTF vs no CTF
garrettwrong Aug 31, 2022
ce74d65
replace from_euler with about_axis. Change max_shift_1d.
j-c-c Aug 31, 2022
e3da2f9
unique_filters bug in batch cov2d
garrettwrong Aug 31, 2022
546b0d6
Refactor for-loop over all_pairs to be a double for-loop. Lift array …
j-c-c Aug 31, 2022
361e013
remove use of all_pairs
j-c-c Aug 31, 2022
6b504e5
Added comments for clarification.
j-c-c Aug 31, 2022
34658d7
docstring
j-c-c Aug 31, 2022
dbbef78
unique_filters bug in batch cov2d
garrettwrong Aug 31, 2022
da5b7d4
initial conversion to batched cov2d
garrettwrong Sep 1, 2022
8811228
`estimate_ctf` integration with `CoordinateSource` (#623)
chris-langfield Sep 1, 2022
aade448
patch conv condition, and asserts
garrettwrong Sep 7, 2022
734d33d
update test vals, radians, regression patch
garrettwrong Sep 7, 2022
752e4e0
stash blockwise pca before expansion refactor
garrettwrong Sep 8, 2022
b8e0658
Fix Volume default flip axis.
garrettwrong Sep 8, 2022
942fed4
Raise on Volume axis 0 flip
garrettwrong Sep 8, 2022
53fd689
Fix cov3d/simulation unit tests that were relying on axis=0
garrettwrong Sep 8, 2022
e8b3956
Merge pull request #692 from ComputationalCryoEM/fix_vol_flip_axis_691
garrettwrong Sep 9, 2022
574a79a
Minimal changes to support batching coef into a (n_img, compressed_co…
garrettwrong Sep 9, 2022
c9cde54
Minor cleanup
garrettwrong Sep 14, 2022
272a3e3
Compressing can just mutate attrs
garrettwrong Sep 14, 2022
e394479
Update eigenimage unit test
garrettwrong Sep 15, 2022
47db6b9
Plugin CTF params directly for covar2d tests
garrettwrong Sep 15, 2022
0b21be4
Rectangular micrograph `estimate_ctf` patch (#688)
chris-langfield Sep 15, 2022
8d2ea65
Merge pull request #686 from ComputationalCryoEM/batched_cov2d_noctf
garrettwrong Sep 15, 2022
f0acc78
Merge remote-tracking branch 'origin/develop' into batched_cls_avg
garrettwrong Sep 15, 2022
d94bb4a
Merge pull request #690 from ComputationalCryoEM/ctf_regression
garrettwrong Sep 15, 2022
7795118
Merge remote-tracking branch 'origin/develop' into batched_cls_avg
garrettwrong Sep 15, 2022
5b8d58b
cyclic_rotations returns Rotation object.
j-c-c Sep 19, 2022
58454b3
resolve conflict.
j-c-c Sep 19, 2022
724bf1b
remove unused return argument.
j-c-c Sep 19, 2022
459a1f9
Merge remote-tracking branch 'origin/develop' into common_lines_symmetry
j-c-c Sep 19, 2022
297f24d
Merge remote-tracking branch 'origin/common_lines_symmetry' into in_p…
j-c-c Sep 19, 2022
6e09ea9
make function private. clarify docstring
j-c-c Sep 19, 2022
53526d6
use snake_case convention
j-c-c Sep 19, 2022
a538033
derive dtype from rots in g_sync
j-c-c Sep 20, 2022
8f6774e
refactor g_sync
j-c-c Sep 20, 2022
c70f3f8
remove unused eigh output.
j-c-c Sep 20, 2022
287cff3
remove unused diagnostic variables. Added clarifying comments.
j-c-c Sep 20, 2022
45c9058
.rots ~> .rotations
garrettwrong Sep 20, 2022
02a4025
Use exp form of Euler formula.
j-c-c Sep 20, 2022
e4875c2
Use Rotation.about_axis(). Remove loop by vectorizing.
j-c-c Sep 20, 2022
b032e21
fixup image exp example
garrettwrong Sep 20, 2022
fdf2de7
rename variable to norm_12
j-c-c Sep 22, 2022
de92fb7
Merge pull request #614 from ComputationalCryoEM/in_plane_rotations
j-c-c Sep 22, 2022
c24ff55
comment cleanup
garrettwrong Sep 26, 2022
9047e00
var name cleanup
garrettwrong Sep 26, 2022
b629e58
image.py doc fix.
j-c-c Sep 27, 2022
b686f53
apple docs fix
j-c-c Sep 27, 2022
3f7a1c2
Basis docs fix
j-c-c Sep 27, 2022
0b1c8fa
Clssification docs fix
j-c-c Sep 27, 2022
224c956
docs fixes
j-c-c Sep 27, 2022
7899a1a
Covar docs fix
j-c-c Sep 27, 2022
7539ede
denoising docs fix
j-c-c Sep 27, 2022
5496fea
image/preprocess.py docs fix
j-c-c Sep 27, 2022
921620f
image/xform.py docs fix
j-c-c Sep 27, 2022
ea8ad9d
nufft docs fix
j-c-c Sep 27, 2022
883e1a0
operators docs fix
j-c-c Sep 27, 2022
bbe80de
optimization docs fix
j-c-c Sep 27, 2022
b8c2a3d
reconstruction docs fix
j-c-c Sep 27, 2022
101be20
source docs fix
j-c-c Sep 27, 2022
84cf54a
utils docs fix
j-c-c Sep 27, 2022
315bc2a
volume docs fix
j-c-c Sep 27, 2022
d746e1a
black
j-c-c Sep 27, 2022
50ac1bc
Add top level import of submodules
garrettwrong Sep 30, 2022
62f56c8
use the dtype from volume in simulated pipeline
garrettwrong Oct 3, 2022
3b3912f
Merge pull request #708 from ComputationalCryoEM/sim_dtype
garrettwrong Oct 3, 2022
46aea84
pass all instances of evaluate_t an Image/Volume
j-c-c Oct 4, 2022
f7628ca
initialize Volume prior to loop
j-c-c Oct 4, 2022
c71b044
remove blank line
j-c-c Oct 4, 2022
5a61ff3
vol[0] in place of np.squeeze
j-c-c Oct 4, 2022
de3c706
Merge pull request #616 from ComputationalCryoEM/common_lines_symmetry
j-c-c Oct 4, 2022
91774eb
Merge pull request #706 from ComputationalCryoEM/mod_init_595
garrettwrong Oct 4, 2022
6cc1c54
Merge pull request #709 from ComputationalCryoEM/evaluate_t_numpy_701
j-c-c Oct 4, 2022
7bbcf51
3D Downsampling (#689)
chris-langfield Oct 4, 2022
83e4dde
Merge branch 'develop' of github.com:ComputationalCryoEM/ASPIRE-Pytho…
garrettwrong Oct 4, 2022
5af3fd3
update .rots~>rotations after develop update
garrettwrong Oct 4, 2022
fe25209
Merge remote-tracking branch 'origin/develop' into batched_cls_avg
garrettwrong Oct 4, 2022
d056fe4
Merge remote-tracking branch 'origin/develop' into docs_fix_702
j-c-c Oct 5, 2022
f2f3baa
Volume wrap
j-c-c Oct 5, 2022
3022a37
Merge pull request #711 from ComputationalCryoEM/estimator_numpy_to_v…
j-c-c Oct 5, 2022
407de5f
Merge pull request #696 from ComputationalCryoEM/rots2rotations
garrettwrong Oct 13, 2022
c5169aa
update sphinx conf `language`
garrettwrong Oct 13, 2022
8a7ce70
Merge remote-tracking branch 'origin/develop' into docs_fix_702
j-c-c Oct 17, 2022
ee21ca7
Refactor of image accessor API for `ImageSource` (#681)
chris-langfield Oct 17, 2022
450fc49
Fix merge regression
garrettwrong Oct 17, 2022
33c6f27
Fix merge regression
garrettwrong Oct 17, 2022
ffd5803
remove unused var
garrettwrong Oct 17, 2022
6ffe5f5
Add garrett to codeowners
garrettwrong Oct 17, 2022
3d7ffe2
manually resolved merge conflict
j-c-c Oct 17, 2022
2fe9839
resolve conflicts
j-c-c Oct 18, 2022
3a004e6
Merge pull request #716 from ComputationalCryoEM/fix_sphinx_lang
garrettwrong Oct 20, 2022
9a3a078
Bump version: 0.9.2 → 0.10.0
garrettwrong Oct 20, 2022
83eb1c3
Merge pull request #723 from ComputationalCryoEM/bump_v0.10.0
garrettwrong Oct 21, 2022
3effbbe
Merge pull request #717 from ComputationalCryoEM/update_owners
garrettwrong Oct 26, 2022
83d03f1
cleanup fspca ell masks
garrettwrong Oct 26, 2022
d4fa8ea
indent new docstring line
garrettwrong Oct 26, 2022
9571203
Merge pull request #695 from ComputationalCryoEM/batched_cls_avg
garrettwrong Oct 26, 2022
ec73eaf
Merge branch 'develop' into docs_fix_702
garrettwrong Oct 26, 2022
0bd790b
Merge pull request #704 from ComputationalCryoEM/docs_fix_702
garrettwrong Oct 26, 2022
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.9.2
current_version = 0.10.0
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
# * @global-owner1 @global-owner2
* @janden
* @janden @garrettwrong

# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![codecov](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python/branch/master/graph/badge.svg?token=3XFC4VONX0)](https://codecov.io/gh/ComputationalCryoEM/ASPIRE-Python)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5657281.svg)](https://doi.org/10.5281/zenodo.5657281)

# ASPIRE - Algorithms for Single Particle Reconstruction - v0.9.2
# ASPIRE - Algorithms for Single Particle Reconstruction - v0.10.0

This is the Python version to supersede the [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.9.2 https://doi.org/10.5281/zenodo.5657281
ComputationalCryoEM/ASPIRE-Python: v0.10.0 https://doi.org/10.5281/zenodo.5657281

```

Expand Down
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ schedules:

jobs:
- job:
displayName: ubuntu-latest
displayName: ubuntu-22.04
pool:
vmImage: 'ubuntu-latest'
vmImage: 'ubuntu-22.04'
strategy:
matrix:
Python37:
Expand All @@ -31,9 +31,9 @@ jobs:
displayName: pytest

- job:
displayName: ubuntu-18.04
displayName: ubuntu-20.04
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
strategy:
matrix:
Python37:
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
displayName: pytest

- job:
displayName: macOS-10.15
displayName: macOS-11
pool:
vmImage: 'macOS-10.15'
vmImage: 'macOS-11'
strategy:
matrix:
Python37:
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
# built documents.
#
# The full version, including alpha/beta/rc tags.
release = version = "0.9.2"
release = version = "0.10.0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
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.9.2
Aspire v0.10.0
==============

Algorithms for Single Particle Reconstruction
Expand Down
99 changes: 60 additions & 39 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CRYO projections (MRC files).
aspire <command>

Running the ``aspire`` module as a script allows one to run different stages of the Cryo-EM data pipeline.
Substitute ``<command>`` with one of the available ``aspire`` commands. Use the ``-h`` flag to display all available commands.
Substitute ``<command>`` with one of the available ``aspire`` commands. Use ``aspire --help`` to display all available commands and ``aspire <command> --help`` to display configurable options for a particular ``<command>``.

Currently, the following operations can be run with ASPIRE:

Expand All @@ -28,73 +28,94 @@ For example, to run the command on sample data included in ASPIRE (a single ``sa
mkdir apple_output
aspire apple --mrc_path /path/to/aspire/data/sample.mrc --output_dir particles

Use the ``--help`` argument with the command to see the several options associated with this command.
2. Particle Extraction
######################

2. Simulation
#############
Given a dataset of full micrographs (``*.mrc`` file) and corresponding coordinate files containing the locations
of picked particles in the ``*.mrc``, the ``extract-particles`` command extracts the particles into one or more ``.mrcs``
stacks and generates a ``.star`` file.

The ``simulation`` command simulates a virtual particle made up of multiple gaussian blobs, generates of set of (noisy) images,
runs the ASPIRE pipeline to determine the estimated mean volume and estimated covariance on the mean volume,
and runs evaluations on these estimated quantities (against the `true` values which we know from the simulation).
Example usage:

.. code-block::

aspire extract-particles --mrc_paths=my/data/sample.mrc --coord_paths=my/data/coords/sample.coord --starfile_out=my_dataset_stack.star --particle_size=256 --centers

3. Estimate Contrast Transfer Function
######################################

The ``estimate-ctf`` command estimates the CTF from experimental data and saves the CTF as an ``.mrc`` file. For example,

.. code-block:: console

aspire simulation
aspire estimate-ctf --data_folder path_to_input_data_folder

Use the ``--help`` argument to look for configurable options. You can select the no. of distinct gaussian blobs, the no. of images,
the resolution of the (square) images generated etc.
.. note::

3. Reconstructing a mean volume with covariance
###############################################
This command expects data files are in the directory prescribed by ``--data_folder``,
and will process all files with the extension ``.mrc`` and ``.mrcs`` contained there.
This command will output ``.mrc`` files to a ``--output_dir`` (``./results`` by default).

The ``cov3d`` command takes in a ``*.star`` file, processes the images (``*.mrcs`` files) found in the starfile, and runs the ASPIRE pipeline
to determine the estimated mean volume and estimated covariance on the mean volume. No results are saved currently, but this command is
a good way to exercise most parts of the ASPIRE pipeline.
4. Image Preprocessing
######################

For example, to run the command on a sample data included in ASPIRE:
The ``preprocess`` command takes in a ``*.star`` file representing particle stacks and applies a selection of preprocessing
methods such as phase flipping, downsampling, normalization to background noise, noise whitening, and contrast inversion.
Resulting images are saved as a starfile.

For example, to run the command on sample data included in ASPIRE:

.. code-block:: console

aspire cov3d --starfile /path/to/aspire/data/sample_relion_data.star --pixel_size 1.338 --max_resolution 8 --cg_tol 0.2
aspire preprocess --starfile_in path/to/aspire/data/sample_relion_data.star --starfile_out preprocess_output.star --downsample 8

.. note::
5. Image Denoising
##################

Pay special attention to the flags specified in the example above. The ``--max_resolution 8``
flag down-samples images to 8x8 pixels (needed otherwise you may run out of memory, and/or the script may take way
too long to execute). ``--cg_tol 0.2`` sets very liberal (and unrealistic) limits on optimization convergence
tolerance, which is needed for such a small dataset. For real datasets, you typically *do not* want to override this
parameter.
The ``denoise`` command takes in a ``*.star`` file, downsamples the images (``*.mrcs`` files) found in the starfile
to a desired resolution, then estimates the noise of the images and whitens that noise using the covariance
Weiner filtering method. The denoised images (``*.mrcs``) and a corresponding starfile are saved in an output folder.

Use the ``--help`` argument to look for configurable options.
For example, to run the command on sample data included in ASPIRE:

4. Crop a set of projections
############################
.. code-block:: console

The ``crop`` command crops a stack of projections of an mrc file to squares of a given size (in pixels). For example,
mkdir denoise_output
aspire denoise --starfile_in path/to/aspire/data/sample_relion_data.star --starfile_out denoise_output/denoised_images.star

.. code-block:: console
6. Orientation Estimation
#########################

aspire --debug -v 3 crop demo.mrc 42
The ``orient3d`` command takes in a ``*.star`` file contaning images and performs an orientation estimation using the
common lines algorithm employing synchronization and voting described at :cite:`DBLP:journals/siamis/ShkolniskyS12`.
The estimated rotations are saved in a starfile along with the original images.

.. note::
For example, to run the command on sample data included in ASPIRE:

This command will crop images found in `demo.mrc` to images of size 42x42, in debug mode and with maximum verbosity.
.. code-block:: console

5. Estimate Contrast Transfer Function
######################################
aspire orient3d --starfile_in path/to/aspire/data/sample_relion_data.star --starfile_out orient3d_output.star

The ``estimate-ctf`` command estimates the CTF from experimental data and returns the CTF as a mrc file. For example,
7. Reconstructing a mean volume with covariance
###############################################

The ``cov3d`` command takes in a ``*.star`` file, processes the images (``*.mrcs`` files) found in the starfile, and runs the ASPIRE pipeline
to determine the estimated mean volume and estimated covariance on the mean volume. No results are saved currently, but this command is
a good way to exercise most parts of the ASPIRE pipeline.

For example, to run the command on a sample data included in ASPIRE:

.. code-block:: console

python -m aspire estimate-ctf --data_folder path_to_input_data_folder
aspire cov3d --starfile /path/to/aspire/data/sample_relion_data.star --pixel_size 1.338 --max_resolution 8 --cg_tol 0.2

.. note::

This command expects data files are in the directory prescribed by ``--data_folder``,
and will process all files with the extension ``.mrc`` and ``.mrcs`` contained there.
This command will output mrc files to a ``--output_dir``, set to ``./results`` by default.

Pay special attention to the flags specified in the example above. The ``--max_resolution 8``
flag down-samples images to 8x8 pixels (needed otherwise you may run out of memory, and/or the script may take way
too long to execute). ``--cg_tol 0.2`` sets very liberal (and unrealistic) limits on optimization convergence
tolerance, which is needed for such a small dataset. For real datasets, you typically *do not* want to override this
parameter.

Arguments, options and flags
############################
Expand Down
16 changes: 16 additions & 0 deletions docs/source/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,19 @@ @article{DBLP:journals/siamis/SingerS11
biburl = {https://dblp.org/rec/bib/journals/siamis/SingerS11},
bibsource = {dblp computer science bibliography, https://dblp.org}
}

@article{DBLP:journals/siamis/ShkolniskyS12,
author = {Yoel Shkolnisky and
Amit Singer},
title = {Viewing Direction Estimation in Cryo-EM Using Synchronization},
journal = {{SIAM} J. Imaging Sci.},
volume = {5},
number = {3},
pages = {1088--1110},
year = {2012},
url = {https://doi.org/10.1137/120863642},
doi = {10.1137/120863642},
timestamp = {Tue, 14 Jul 2020 14:30:31 +0200},
biburl = {https://dblp.org/rec/journals/siamis/ShkolniskyS12.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
10 changes: 5 additions & 5 deletions gallery/experiments/experimental_abinitio_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

# Peek
if interactive:
src.images(0, 10).show()
src.images[:10].show()

# Use phase_flip to attempt correcting for CTF.
logger.info("Perform phase flip to input images.")
Expand All @@ -87,7 +87,7 @@

# Peek, what do the whitened images look like...
if interactive:
src.images(0, 10).show()
src.images[:10].show()

# # Optionally invert image contrast, depends on data convention.
# # This is not needed for 10028, but included anyway.
Expand Down Expand Up @@ -117,7 +117,7 @@
classification_src = cwf_denoiser.denoise()
# Peek, what do the denoised images look like...
if interactive:
classification_src.images(0, 10).show()
classification_src.images[:10].show()

# Use regular `src` for the alignment and composition (averaging).
composite_basis = FFBBasis2D((src.L,) * 2, dtype=src.dtype)
Expand Down Expand Up @@ -147,7 +147,7 @@
classes, reflections, distances = rir.classify()
avgs = rir.averages(classes, reflections, distances)
if interactive:
avgs.images(0, 10).show()
avgs.images[:10].show()

# %%
# Common Line Estimation
Expand All @@ -172,7 +172,7 @@
logger.info("Begin Volume reconstruction")

# Assign the estimated rotations to the class averages
avgs.rots = rots_est
avgs.rotations = rots_est

# Create a reasonable Basis for the 3d Volume
basis = FFBBasis3D((img_size,) * 3, dtype=src.dtype)
Expand Down
12 changes: 6 additions & 6 deletions gallery/experiments/preprocess_imgs_exp.py.dontrun
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@ source = RelionSource(
nimgs_ext = 1

print('Obtain original images')
imgs_od = source.images(start=0, num=nimgs_ext)
imgs_od = source.images[:nimgs_ext]

print('Perform phase flip to input images')
source.phase_flip()
imgs_pf = source.images(start=0, num=nimgs_ext)
imgs_pf = source.images[:nimgs_ext]

max_resolution = 60
print(f'Downsample resolution to {max_resolution} X {max_resolution}')
source.downsample(max_resolution)
imgs_ds = source.images(start=0, num=nimgs_ext)
imgs_ds = source.images[:nimgs_ext]

print('Normalize images to noise background')
source.normalize_background()
imgs_nb = source.images(start=0, num=nimgs_ext)
imgs_nb = source.images[:nimgs_ext]

print('Whiten noise of images')
noise_estimator = WhiteNoiseEstimator(source)
source.whiten(noise_estimator.filter)
imgs_wt = source.images(start=0, num=nimgs_ext)
imgs_wt = source.images[:nimgs_ext]

print('Invert global density contrast')
source.invert_contrast()
imgs_rc = source.images(start=0, num=nimgs_ext)
imgs_rc = source.images[:nimgs_ext]

# plot the first images
print('plot the first images')
Expand Down
13 changes: 7 additions & 6 deletions gallery/experiments/simulated_abinitio_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ def noise_function(x, y):
vols=v,
noise_filter=custom_noise_filter,
unique_filters=ctf_filters,
dtype=v.dtype,
)
# Peek
if interactive:
src.images(0, 10).show()
src.images[:10].show()

# Use phase_flip to attempt correcting for CTF.
logger.info("Perform phase flip to input images.")
Expand All @@ -126,7 +127,7 @@ def noise_function(x, y):

# Peek, what do the whitened images look like...
if interactive:
src.images(0, 10).show()
src.images[:10].show()

# Cache to memory for some speedup
src.cache()
Expand Down Expand Up @@ -154,7 +155,7 @@ def noise_function(x, y):
classification_src = cwf_denoiser.denoise()
# Peek, what do the denoised images look like...
if interactive:
classification_src.images(0, 10).show()
classification_src.images[:10].show()

# Use regular `src` for the alignment and composition (averaging).
composite_basis = FFBBasis2D((src.L,) * 2, dtype=src.dtype)
Expand Down Expand Up @@ -184,7 +185,7 @@ def noise_function(x, y):
classes, reflections, distances = rir.classify()
avgs = rir.averages(classes, reflections, distances)
if interactive:
avgs.images(0, 10).show()
avgs.images[:10].show()

# %%
# Common Line Estimation
Expand All @@ -197,7 +198,7 @@ def noise_function(x, y):

# Stash true rotations for later comparison,
# note this line only works with naive class selection...
true_rotations = src.rots[:n_classes]
true_rotations = src.rotations[:n_classes]

orient_est = CLSyncVoting(avgs, n_theta=36)
# Get the estimated rotations
Expand All @@ -222,7 +223,7 @@ def noise_function(x, y):
logger.info("Begin Volume reconstruction")

# Assign the estimated rotations to the class averages
avgs.rots = rots_est
avgs.rotations = rots_est

# Create a reasonable Basis for the 3d Volume
basis = FFBBasis3D((v.resolution,) * 3, dtype=v.dtype)
Expand Down
Loading