Hi Rui. EMAN2 uses FFTW convention (which is the same for pretty much all other FFT libraries out there). If you just say
fft=image.do_fft()
then the phase origin in real-space is at (0,0), the corner of the image, not the center. In Fourier space, the Fourier origin (0 in x and y) is also at (0,0).
In most cases the phase-origin is more intuitive if it's at the center of the image. This can be accomplished with:
image.process_inplace("xform.phaseorigin.tocorner")
fft=image.do_fft()
The complex origin will still be at the origin of the image, however. There are two solutions to this issue. From Python, if you access the complex pixel values as:
fft[x,y]
or
fft[x,y]=newcomplex
it will properly handle all periodic boundary conditions, and x and y can range from -box_size/2 to +box_size/2. That is
fft[0,0] will be at the Fourier origin.
fft[4,0] will be 4 complex pixels away from the origin in the x direction
To convert these pixel locations in the FFT to 1/Å, ds=1.0/(Apix*box_size)
for example location fft[0,4] is 4 pixels from the origin. with a box size of 100 and 2.0 A/pix, this would
correspond to 1/50 1/Å.
----------------------------------------------------------------------------
Steven Ludtke, Ph.D.
Co-Director National Center For Macromolecular Imaging
(
ncmi.bcm.edu)
Baylor College of Medicine
Hi, Steve,
I am trying to write a python script to mask out a certain layer line (say 40 Angstrom) for a microtubule image in Fourier space, but I am not sure I understand how FT is stored/displayed in EMAN2. The fourier origin and mirror things are confusing to me.
Can you or someone help me out?
Basically I want to do:
a = EMData('MT.hed',0)
f = a.do_fft()
# to set some pixels in Fourier space to zero
b = f.do_ift()
Thank you!
Rui