Skip to content

Conversation

@alncat
Copy link
Contributor

@alncat alncat commented May 26, 2025

Dear PyTOM developers,
I noticed that there is a small bug when performing local alignment using the subtomogram and CTF reconstructed by WARP. The CTF volume reconstructed by WARP is of size (D//2+1, D, D) if the subtomogram is of size (D, D, D), i..e, the reduced axis is 0. Therefore, we should expand fourier transforms from reduced representation to full representation by specifying the reduced axis as 0. Hence, I made the modification,

return fftshift(fourier_reduced2full(wedge, reduced_axis=0))

Best Regards,
Zhenwei

@alncat
Copy link
Contributor Author

alncat commented Sep 14, 2025

Hi @sroet, just checking the status of this PR. Do you have any time to review it?

@sroet
Copy link
Collaborator

sroet commented Sep 16, 2025

Hey @alncat, Thanks for proposing a fix and the reminder ping.

About the code, it is mentioned in the docstring of the class on line 1548-1553:

class Wedge3dCTF(PyTomClass):
    """
    This is a class to allow pytom running with 3d ctf volumes from warp or relion as the missing wedge.
    Class handles reading of the wedge file from disk. Before being able to use the 3d ctf from warp it
    first needs to be converted to have the z axis as the reduced fourier space dimension.
    """

This class is for both WARP and RELION files, however for WARP files the user needs to make the z-axis the reduced fourier dimension.

I think the code is working as intended and this would break both our internal representation and the reading of RELION files. I will close this PR, but feel free to reopen/discuss if you don't agree with this.

@sroet sroet closed this Sep 16, 2025
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