Question about CTF phase flip correction

1,057 views
Skip to first unread message

Yuchen Deng

unread,
Dec 17, 2014, 5:36:02 AM12/17/14
to em...@googlegroups.com

Dear Steve,

I'm a PhD. student from Prof. Fei Sun's Lab (Institute of Biophysics, CAS, Beijing). It has been a long time since I last met you in Shanghai's workshop. I don't know whether you could recall the boy with 'full load of questions',  here I come back again with my naive ones.

This time is about CTF correction.
I'm now developing a tomo-CTF correction software. Since tomography images vary in defocus even in a single tilt, the defocus has to be corrected tile by tile parallel to rotation axis (as John Briggs described in a 2012 JSB paper).
After dealing with dozens of technical headaches, I stuck at somewhere strange.
The attached image is a CTF curve I generated with Bfactor & without amplitude contrast.(with respect to 'Weak phase object approximation ')
I see that with underfocus around ~-2um, the first Peak has a negative value. I think it means that frequency information inside this peak is reversed(Black -> White and vice versa.). Considering that almost all energy are stored in low frequency, it may explain why we see dark protein & bright ice background in CryoEM.
So when I apply my version of 'phase flip' to the image, the image appears inverted. (Bright protein & dark background).

Then I recall in EMAN2, when I put the original Micrographs inside the program, it transfer the MRC files to hdf and invert the contrast.Then after boxing the particles and determine the defocus, I can generate particle stack with phase flip correction. 
What bothers me is that, the phase flip step in EMAN2 does not seem to invert the contrast in particle. But if we consider that the first peak in CTF(ignoring amplitude contrast) is almost always negative, I cannot understand why EMAN does not invert contrast during phase flip.

Does it mean that you already take the first 'invert' of raw micrographs into account, and make a modified version of phase flip, which invert the positive zones of CTF to negative?

Sincerely yours,
Yuchen Deng.
CTF512.jpg

Steven Ludtke

unread,
Dec 17, 2014, 7:12:55 AM12/17/14
to em...@googlegroups.com
Hi Yuchen. There are many different derivations of the weak-phase approximation. Many produce  a sin(gamma) rather than a -sin(gamma) term. This all depends on the assumptions you make during the derivation.  When you collect images on a CCD camera, the phase shift is in the same direction caused by absorption. That is the protein is darker because fewer electrons get to the detector where the (denser) protein is. This is due to both the phase contrast as well as the small amount of amplitude contrast. In EMAN, we prefer to work with “white” protein rather than “dark” protein. This is purely a convention. Mathematically you can go either way. 

The curve you are showing is pure phase contrast, which doesn’t exist in real images, particularly with the thicker specimens normally used for tomography. You can use whichever convention you prefer (-sin(g) or sin(g)). Just make sure that the relative sign of the cos(g) amplitude contrast term matches properly so increasing amplitude contrast shifts the phase of the CTF curve towards the origin, not away from it (away would be overfocus).

--
--
----------------------------------------------------------------------------------------------
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.
For more options, visit https://groups.google.com/d/optout.
<CTF512.jpg>

Yuchen Deng

unread,
Dec 18, 2014, 1:57:50 AM12/18/14
to em...@googlegroups.com

Thank you Steve, 
As you suggested, I put 0.2 amplitude contrast in my CTF function to see what's gonna happen , then I get more confused than ever....
In SparxWiki edited by Penczek (http://sparx-em.org/sparxwiki/CTF_info) and also in Jochim Frank's book, The relative sign between phase and amplitude contrast is sin(g)-cos(g), where g ~ c0*Cs*s^4-c1*defocus*s^2, (here c0 and c1 represent some parameter, s is frequency in Fourier space, defocus is positive when 'underfocus'). But in wikipedia(http://en.wikipedia.org/wiki/Contrast_transfer_function), follow the same definition of g, we have sin(-g)+cos(-g), which, in the aspect of relative sign, is identical to sin(g)-cos(g). BUT it's underfocus is negative...
So i'm convinced that one of them MUST be wrong, problem is that I don't know which... 
For the sake of convenience, I generate both of them into .jpg file and attached here(300kv, 0.2 amplitude contrast, 2um underfocus).... By the shape of them, I think maybe the wikipedia page is wrong. 
Redline is underfocus:positive case, start from 0.2
Blueline is underfocus:negative case

Steven Ludtke

unread,
Dec 18, 2014, 7:57:34 AM12/18/14
to em...@googlegroups.com
I can’t tell from your description which function you used for which curve, but clearly the blue curve is overfocus (note the zero crossing near 8) and the red curve is underfocus. Whatever description is consistent with those two facts is the correct one.

You realize, of course, that there are existing implementations of strip-based CTF correction for tomography, right?  I’m not saying you shouldn’t do your own, just pointing out that there are existing, well tested, solutions.

Steven Ludtke

unread,
Dec 18, 2014, 8:07:57 AM12/18/14
to Steven Ludtke, em...@googlegroups.com
Let me add that there is a simple CTF simulator in EMAN2.1 (e2ctfsim.py) which you can compare against your own results. Pawel and I resolved all of our CTF differences mathematically some time ago. Just remember that underfocus should phase shift the zeroes towards the origin. When performing CTF correction, the overall sign of the CTF curve just depends on whether you want the image contrast to be inverted or not for processing, which is an arbitrary convention (ie - should higher electron density represent a more positive or a more negative value). EMAN uses the positive -> higher density convention. The relation between potential and electron density is normally assumed to be linear except for unusual situations.

Paul Penczek

unread,
Dec 18, 2014, 10:10:40 AM12/18/14
to em...@googlegroups.com, Steven Ludtke
Hi,

the correct reference to the CTF math is here:
Penczek, P.A.: Image restoration in cryo-electron microscopy. Methods Enzymol 482:35-72, 2010. 

I have to admit it makes me feel exceedingly uneasy when wikipedia is used as a source of knowledge.
Do you know who wrote this page?  It can be checked in history of changes.

Pawel Penczek   

Yuchen Deng

unread,
Dec 18, 2014, 12:42:00 PM12/18/14
to em...@googlegroups.com, slud...@gmail.com
Thank you all for generous help.
After playing with e2ctfsim.py, I'm now convinced that Wikipedia page is wrong. I should have cross checked my fomular with published articles rather than simply believing in wiki...
You suggest that there are stripe-based tomo-CTF correction softwares, I know 'ctfphaseflip' distributed with the IMOD package. & I know J.J Fernandez developed something else back at 2006.
The reason that I'm writing my own program is that I think we should perform CTF correction prior to any rotation interpolation, which may be the case in 'ctfphaseflip'.(And, handness of aquired image is essential for defocus gradient detection, I don't know and can't tell whether published softwares share the same coordinate system with me.)
With your help, I can now phase flip my tile-image cropped from tomography data. The only problem left is that they are all small-sized: sometimes 128^2 or less. So finding zero points and flipping with precision is hard due to computer's discrete nature. Do you think padding them by zeros (oversampling them in Fourier Space) is a wise idea? 

Steven Ludtke

unread,
Dec 18, 2014, 1:14:20 PM12/18/14
to Yuchen Deng, em...@googlegroups.com
Hi. You might even fix the entry in Wikipedia (or prompt the editor who wrote it to do so).

There is absolutely no point in doing striped corrections in subtomograms. If you are boxing out particles from the tilt series, then you would do normal phase-flipping on each extracted subframe (in each tilt) with a single defocus value determined from the location of the particle in the frame. The amount of gradient across a single particle will, in general, be less than the size of the particle itself, so unless you are doing depth of field corrections, gradient correction within a particle is utterly meaningless.

Yuchen Deng

unread,
Dec 18, 2014, 10:58:10 PM12/18/14
to em...@googlegroups.com, freder...@gmail.com
Dear Steve,
I understand that performing per-particle defocus-gradient CTF correction is 'utterly meaningless'. My terrible English makes you believe I'm doing so... I'm doing stripe-based full tomogram correction, the 'handness' I mentioned  is for dertermining 'positive sign' for tilt angle.
Anyway, all my problems are solved with your kindness & help. Thank you ! 
I have to 'buy' my way to google group(VPN) in China so I can talk to you, but like Prof. Fei Sun told me, it proved its worth.
I take wiki as a reliable source of knowledge because I can't even google back here, so other sources are hard to find... maybe we should figure out some way around other than google group, so that my co-workers in China can stay in touch with all your wisdom and knowledge~?

Best, 
Yuchen Deng

Steven Ludtke

unread,
Dec 19, 2014, 12:20:28 AM12/19/14
to em...@googlegroups.com, freder...@gmail.com
Hi. Sorry I misinterpreted your statement.  I do wish there were a good solution to the China/Google situation. While I realize there are other non-google group-like services out there, migrating would entail losing several years of valuable archives without some serious effort. We also tend to use Google for a variety of other related purposes, so here, at least it’s very convenient. I keep hoping China and Google will eventually make peace with each other :^/

Maybe we can work out a strategy for proxying just the EMAN group through our server or somesuch…  In any case, you are always welcome to email me directly. I realize that doesn’t solve the general problem.

I’m not quite as skeptical about Wikipedia’s accuracy as Pawel seems to be. While I agree that in certain areas (like politics) it’s not exactly reliable, for most science/math it’s actually pretty decent. Like anything else on the web, you need to cross check it against other resources, but at least if you find a mistake, correcting it isn’t generally a major problem...

----------------------------------------------------------------------------
Steven Ludtke, Ph.D.
Professor, Dept of Biochemistry and Mol. Biol.         (www.bcm.edu/biochem)
Co-Director National Center For Macromolecular Imaging        (ncmi.bcm.edu)
Co-Director CIBR Center                          (www.bcm.edu/research/cibr)
Baylor College of Medicine                             





Then I recall in EMAN2, when I put the original Micrographs inside the program, it transfer the MRC files to hdf and invertthe contrast.Then after boxing the particles and determine the defocus, I can generate particle stack with phase flip correction. 
Reply all
Reply to author
Forward
0 new messages