Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrientedSource #890

Merged
merged 85 commits into from
Jun 26, 2023
Merged

OrientedSource #890

merged 85 commits into from
Jun 26, 2023

Conversation

j-c-c
Copy link
Collaborator

@j-c-c j-c-c commented Mar 22, 2023

Adds OrientedSource class that consumes a src and an orientation estimation instance (ie. CLSyncVoting) and serves up images with rotations assigned.

Adds a SymmetryGroup class to be used by SyntheticVolume and ImageSource. Instances of ImageSource now have a symmetry_group attribute (which is a SymmetryGroup object) and corresponding metadata field _rlnSymmetryGroup.

See issue #875

@j-c-c j-c-c added the enhancement New feature or request label Mar 22, 2023
@j-c-c j-c-c self-assigned this Mar 22, 2023
@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #890 (a16e340) into develop (3b2477c) will increase coverage by 0.18%.
The diff coverage is 98.58%.

@@             Coverage Diff             @@
##           develop     #890      +/-   ##
===========================================
+ Coverage    88.51%   88.70%   +0.18%     
===========================================
  Files          120      120              
  Lines        10445    10585     +140     
===========================================
+ Hits          9245     9389     +144     
+ Misses        1200     1196       -4     
Impacted Files Coverage Δ
src/aspire/abinitio/__init__.py 100.00% <ø> (ø)
src/aspire/abinitio/commonline_base.py 94.79% <ø> (-0.09%) ⬇️
src/aspire/source/relion.py 97.97% <ø> (+1.01%) ⬆️
src/aspire/source/image.py 92.10% <96.00%> (+0.73%) ⬆️
src/aspire/commands/orient3d.py 100.00% <100.00%> (ø)
src/aspire/source/__init__.py 100.00% <100.00%> (ø)
src/aspire/source/coordinates.py 92.30% <100.00%> (ø)
src/aspire/source/simulation.py 98.97% <100.00%> (+0.01%) ⬆️
src/aspire/volume/__init__.py 100.00% <100.00%> (ø)
src/aspire/volume/symmetry_groups.py 100.00% <100.00%> (ø)
... and 2 more

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@j-c-c j-c-c changed the title Symmetry groups OrientedSource Mar 23, 2023
@garrettwrong
Copy link
Collaborator

Moving to v0.11.1

Copy link
Collaborator

@garrettwrong garrettwrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid start, thanks. Mostly minor oversights, but there is also still some refactoring to do. Think the suggestions over and let me know if I got any wrong or you are stuck.

gallery/experiments/simulated_abinitio_pipeline.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Show resolved Hide resolved
tests/test_symmetry_groups.py Outdated Show resolved Hide resolved
tests/test_oriented_source.py Outdated Show resolved Hide resolved
tests/test_oriented_source.py Outdated Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Show resolved Hide resolved
@j-c-c
Copy link
Collaborator Author

j-c-c commented May 22, 2023

@garrettwrong I've done a bit of refactoring and cleanup. I think this is in a good place to take another look. Thanks!

@j-c-c j-c-c requested a review from garrettwrong May 22, 2023 19:45
Copy link
Collaborator

@garrettwrong garrettwrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, couple small tweaks on the refactored code. Thanks!

gallery/tutorials/pipeline_demo.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Show resolved Hide resolved
src/aspire/source/image.py Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/volume/volume.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Show resolved Hide resolved
src/aspire/source/image.py Outdated Show resolved Hide resolved
src/aspire/volume/volume.py Show resolved Hide resolved
garrettwrong
garrettwrong previously approved these changes May 24, 2023
Copy link
Collaborator

@garrettwrong garrettwrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting those updates through. Looks like just a minor merge conflict to resolve and you should be ready for the next review :).

@j-c-c j-c-c marked this pull request as ready for review May 25, 2023 14:02
@j-c-c j-c-c requested a review from janden as a code owner May 25, 2023 14:02
Copy link
Collaborator

@janden janden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I've only reviewed core (src/*) code for now. Once that's stable I'll tackle the gallery and tests.

src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Show resolved Hide resolved
src/aspire/volume/volume_synthesis.py Outdated Show resolved Hide resolved
src/aspire/volume/symmetry_groups.py Outdated Show resolved Hide resolved
src/aspire/volume/volume_synthesis.py Show resolved Hide resolved
src/aspire/source/image.py Outdated Show resolved Hide resolved
src/aspire/source/image.py Outdated Show resolved Hide resolved
@j-c-c
Copy link
Collaborator Author

j-c-c commented Jun 15, 2023

@janden I've addressed all of your initial comments/questions, so I think this is in a good place to take another look.

The only unresolved discussions are whether our symmetry groups should be in O(3) or SO(3) and if we want an IdentitySymmetryGroup.

Copy link
Collaborator

@janden janden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@j-c-c j-c-c merged commit e1fe235 into develop Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants