Changing image format from real/imaginary to amplitude/phase format in EMAN2 is a straightforward procedure. To illustrate the process start with a test image and perform an inplace Fourier transform on it as follows:
You now have an EMData object (e) in real/imaginary format. You can verify that the image is in this format by calling the function is_ri, for example try:
To convert the image to amplitude/phase format simply do the following:
Note that it's relatively straightforward to access values from the EMData object (e) using the get function call, and that we have verified the EMData object is in amplitude/phase format using the function is_ri, as demonstrated above. Finally, you can convert back to to real/imaginary format by doing: