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

feature: calculate subvolume defocus values #217

Merged
merged 52 commits into from
Aug 15, 2024

Conversation

McHaillet
Copy link
Collaborator

@McHaillet McHaillet commented Aug 13, 2024

This PR adds support for calculating defocus value for each subvolume specified with --volume-split in template matching. As particles experience a different defocus based on their position in the ice and depending on the tilt angle, this potentially provides detailed defocus gradient correction. However, I also added a page on the site with a benchmark for measuring the effects of defocus gradient correction and found that the effect is very small. I thought this would be cool to add.

  • implementation
  • add benchmark
  • I left the version number as we did not release 0.7.2 yet.
  • I made a change in angles.py to read the log_level as an integer as this is what is available in the TMJob. I also removed a section there that overwrote the log_level as a string. (should have put this in a separate PR, sorry for that)

Copy link

github-actions bot commented Aug 13, 2024

File Coverage Missing
All files 87%
src/pytom_tm/correlation.py 85% 98-99 131
src/pytom_tm/entry_points.py 79% 28 113-130 235-280 385-404 540-558 1030-1041
src/pytom_tm/extract.py 76% 127-138 205-212 256-261 354-372
src/pytom_tm/io.py 80% 20 40 58 76 89 110-116 133-137 144 150 162 169 216-218 288 325-328 433-441 466
src/pytom_tm/mask.py 80% 76 94 104-105
src/pytom_tm/parallel.py 89% 14-15 93 104-105 111 176
src/pytom_tm/plotting.py 16% 19-21 24-31 35-43 47-50 53-69 72-73 76-77 97-102 118-126 132-149 164-172 176-193 197-205 209-216 222 228 233 247-397
src/pytom_tm/tmjob.py 97% 364-365 381 391-396 475 598 647
src/pytom_tm/utils.py 78% 18-20
src/pytom_tm/weights.py 96% 59 314-318 325 535 540 545

Minimum allowed coverage is 86%

Generated by 🐒 cobertura-action against ed489e6

@McHaillet McHaillet force-pushed the feature-subvolume-defocus branch from 2585201 to 2b7afca Compare August 14, 2024 10:17
@McHaillet McHaillet marked this pull request as ready for review August 14, 2024 10:18
@McHaillet McHaillet requested a review from sroet August 14, 2024 10:27
Copy link
Collaborator

@sroet sroet left a comment

Choose a reason for hiding this comment

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

Some issues and feedback.

Other points:

  • Would this need an option to override the tilt-axis? Or are those always "close enough" to the y-axis?

Comment on lines +27 to +31
<figure markdown="span">
![annotations](defocus_handedness_figures/blik_view.png){ width="400" }
<figcaption>Initial view of the data: annotations (turqoise sphere) made by
pytom-match-pick on tomogram 27 of EMPIAR-10985.</figcaption>
</figure>
Copy link
Collaborator

Choose a reason for hiding this comment

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

this seems broken in github MD rendering

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess it is not supported in native markdown: https://squidfunk.github.io/mkdocs-material/reference/images/#image-captions

The md_in_html extension (in the mkdocs.yml) enables it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I meant the captions are not supported

@McHaillet
Copy link
Collaborator Author

* Would this need an option to override the tilt-axis? Or are those always "close enough" to the y-axis?

The tilt axis of the tilt series is always aligned with the y-axis of the tomogram. It's the common convention as far as I know. So should be safe.

@McHaillet McHaillet requested a review from sroet August 15, 2024 08:15
Copy link
Collaborator

@sroet sroet 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 the changes! LGTM!

@McHaillet McHaillet merged commit 472a4aa into SBC-Utrecht:main Aug 15, 2024
2 checks passed
@McHaillet McHaillet deleted the feature-subvolume-defocus branch August 15, 2024 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants