1. e2fileinfo

Extracting defocus, bfactor and amplitude contrast information from your data

To extract all the defocus values into an ascii text file do

e2fileinfo.py mydata.img --getinfo=def > defocus_data.txt

To extract all the bfactors into an ascii text file do

e2fileinfo.py mydata.img --getinfo=bf > bfactor_data.txt

To extract all of the amplitude contrast values into an ascii text file do

e2fileinfo.py mydata.img --getinfo=ac > amp_contrast_data.txt

You can then look at the data as histogram or other plots using octave (http://www.octave.org) or matlab. Note that you should use a later version of octave, for instance 2.9.9 works but versions 2.1.? do not seem to able to parse the ascii files.

In octave you would simply do

octave:1> load('-ascii', 'bfactors_data.txt')

octave:2> hist(bfactor_data,40)

And this will display the bfactors of your data in a histogram with 40 bins, and will look something like this:

In the same octave session you could look at the relationship between defocus and bfactors by doing

octave:3> load('-ascii', 'defocus_data.txt')

octave:4> plot(defocus_data,bfactor_data,'x')

And you would get a plot that looks like this:

Removing particle images, such as those with undesirable bfactors (e.g. too high), undesirable defocus values (e.g. too high) or amplitude contrast (e.g. inconsistent with rest of data set)

To remove all particles with bfactors bigger than 210 do

e2fileinfo.py mydata.img --remove=bf\>210

Note the "\>" is required so that the string literal ">" is passed as the argument to the program. You can use any of the logical expressions in the following "==", "<=", ">=", "!=", "~=", "<", ">" - being sure to insert the appropriate "\" where required on the command line, as in the example directly above.

For example to remove all particles with an amplitude contrast not equal to .1 do

e2fileinfo.py mydata.img --remove=ac!=.1

and to remove all particles with defocus values equal to 3.123 do

e2fileinfo.py mydata.img --remove=df==3.123

At the moment the cleaned image is written to disk as cleaned.img - this will change soon to allow the user to input the output image name.

EMAN2/Programs/e2fileinfo (last edited 2009-07-24 02:45:41 by bcm-10-134)