e2proc2d simulating and comparing CTF

108 views
Skip to first unread message

Evan Seitz

unread,
Mar 11, 2021, 12:15:10 PM3/11/21
to EMAN2
Hello, I've recently had some confusion with the CTF object output from e2proc2d.py. Specifically, when I run an example command:

e2proc2d.py input_volume.mrc output_name --process=math.simulatectf:ampcont=10:apix=1:cs=2.7:defocus=1.1962:voltage=300:bfactor=30:purectf=True

I get a CTF object that acts very differently than a CTF object generated with my own script using identical parameters. I'm attaching an image comparison, showing EMAN2 purectf output on the left and my isolated CTF output on the right (generated using equations from Frank, J. textbook and Sander, B. 2003 and the parameters in the above example). They are very different.

Further, when I use my CTF output (right) to CTF-correct (via CTF/Weiner) the EMAN2 image (received with purectf=False), and take the 2D average of the resultant CTF-corrected stack, everything looks perfect (i.e., visually equivalent to the 2D average of the non-CTF stack, generated straight from e2project3d). When I instead take the purectf=True output and use it in the same CTF-correction algorithm, I get very inaccurate results.

Does the CTF object from purectf=True need to be altered for use in CTF correction?

Thank you,
Evan Seitz
Columbia University

EMAN 2.31 final

LHS_EMAN_RHS_USER.png

Steve Ludtke

unread,
Mar 23, 2021, 9:33:27 PM3/23/21
to em...@googlegroups.com
Hi Evan, sorry I must have missed this when you originally posted it. Don't know if you've solved your problem in the last 2 weeks or not. It's difficult for me to debug what you're seeing based on only what you provided. 'e2ctfsim.py' makes direct use of the internal CTF objects in EMAN2 and may offer some illustrative examples (running it and looking at the code). The periodicities look approximately correct, but there is clearly an issue with the phases here. Your plots show both negative and positive values, so I'm guessing you are displaying the real component of the (complex) Fourier transform here? The CTF is, at least, real valued, so this is possible, but not how it's conventionally displayed. Radially the curve should appear like the attached plot, and neither of the functions you are displaying seem to have the correct behavior near the origin. While it is true that some conventions display this curve multiplied by -1 (which has no effect on phase flipping other than an overall contrast inversion), the second (right) curve you displayed seems to be overfocus rather than underfocus due to the behavior near the origin. I'm certain the internal CTF object in EMAN2 behaves correctly, and not aware of any bugs in math.simulatectf which could cause this. But I can't tell clearly if there is a problem from your figure. Certainly your display is missing the B factor and has the incorrect phase shift, but I can't tell if there is a phase issue on the left.
-----------------------------------------
Steven Ludtke, slud...@gmail.com 


--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/eebb488c-a583-496d-b5fa-52eb19033b9dn%40googlegroups.com.
<LHS_EMAN_RHS_USER.png>

Evan Seitz

unread,
Mar 25, 2021, 9:59:32 PM3/25/21
to EMAN2
Hi Steven - thank you so much for your reply. I've actually gotten my issue resolved now for what I needed to do at the time of my message. I'll post here my final results though in case there is any chance it could be helpful. The test I ran was to use the raw image from e2proc3d.py (the "object", I'll call it) and modify it with (1) the CTF I'm generating personally via Frank equations and then independently with (2) the CTF that is output from e2proc2d purectf=True. I then compare (1) and (2) with the CTF-modifed image that is output from e2proc2d purectf=False. As the slides show, I was able to generate the same output as EMAN's purectf=False with my Frank CTF on Slide 1, but I was unable to do the same using the CTF output from purectf=True (slide 2). There is either an extra step that I need to consider when handling the purectf=True output, or perhaps that output is not actually kicking out the CTF that is used to generate the purectf=False output?? I have everything squared away now on my side, so no worries about this from me. Might be interesting to look into though; my apologies if I've confused matters more or remained dense.

All the best,
Evan
CTF_Analysis_Slide1.png
CTF_Analysis_Slide2.png

Ludtke, Steven J.

unread,
Mar 25, 2021, 11:14:03 PM3/25/21
to em...@googlegroups.com
Looking at the image you showed from purectf=True, I'm wondering if you may have been showing the real-space result of the program rather than it's Fourier transform? When you run this processor with purectf=True, it still produces an image in real-space, ie - it produces the inverse Fourier transform of the CTF function, which is the point-spread function. You need to display/compute the FFT of this image to see the CTF...

When you run it without purectf=True, it also produces a real-space image, but in that case, the CTF has been applied to (multiplication in Fourier space) the input image.
--------------------------------------------------------------------------------------
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine 
Charles C. Bell Jr., Professor of Structural Biology
Dept. of Biochemistry and Molecular Biology                      (www.bcm.edu/biochem)
Academic Director, CryoEM Core                                        (cryoem.bcm.edu)
Co-Director CIBR Center                                    (www.bcm.edu/research/cibr)




To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/3dad0aa5-b57b-4890-9a2c-d54457f2e3a7n%40googlegroups.com.
<CTF_Analysis_Slide1.png><CTF_Analysis_Slide2.png>

Evan Seitz

unread,
Mar 26, 2021, 11:57:34 AM3/26/21
to EMAN2
Voilà! That's exactly it. Once I take the inverse FT of the purectf=True output and apply the same operations (note: using +1, not -1 multiplication), I get the purectf=False output. Thank you so much for your patience and a very good eye.

For future travelers, may I kindly suggest an update to 'e2help.py processor simulatectf -v 2'? Therein, for the purectf(BOOL) readme: possibly mention that it is the inverse FT of the CTF function.

All the best,
Evan

Reply all
Reply to author
Forward
0 new messages