-
Notifications
You must be signed in to change notification settings - Fork 5
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
Projection from 2D -> 1D for common lines #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@McHaillet once again, so so psyched to see this!!
I've left a few minor comments but very happy to merge this once those are addressed
src/libtilt/projection/__init__.py
Outdated
@@ -1,2 +1,2 @@ | |||
from .project_fourier import project_fourier | |||
from .project_real import project_real | |||
from .project_real import project_real_3d, project_real_2d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something about this doesn't feel 100% clear - how about project_volume
and project_image
? 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed it now to project_volume_real and project_image_real to not mess with potential variants from project_fourier. Let me know if you agree.
Good point! I can add this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're a wizard, those common line images are gorgeous 😍 great example of why vis is so important!
I had another thought when rereading the code - the 'grid' with one grid point is useful only if we might later want to increase the resolution to model the tilt axis varying over time... otherwise a bare torch parameter would look more normal
Amazing work once again! Let's merge and iterate here
Thanks!!
I left it because I tried optimizing with multiple grid points that vary with tilt angle, which is described in the AreTomo paper. Although in my experience running AreTomo it only ever optimizes a single tilt-axis (in-plane rotation). But I agree, varying over time could make sense! |
@alisterburt I started some work on a PR for the 2D -> 1D projection. I copied and adapted the code your wrote for the real space 3D->2D projection to create an equivalent function. It would be nice if you could give some feedback on that code and where to place it. I now added it to project_real but some other libraries seems to have separate files for 3d/2d, should that be the case for this as well?
The same still needs to be done for Fourier space 2D->1D but that seems more complicated as besides functions in project_fourier, it also requires a sample_dft_2d in interpolation.
I updated the coarse alignment example as well to test if the proper tilt-axis angle could be optimised based on common lines. Seems to work quite nicely! I start with an angle that is way off (-30, while the actual angle is -88.7), and it finds the correct angle back. Importantly, I need to run it on the raw tilt-series. If I first apply the xcorr shifts, the tilt-axis is quite off (-100).
This is a PR that closes #65 (partly).