The CTF Model(s) used in EMAN2

UNDER CONSTRUCTION

Like other aspects of EMAN2, the CTF model infrastructure is extensible, though less so than the Processors, Reconstructors, etc. At present, there are 2 types of CTF instances in EMAN2: EMAN1Ctf and EMAN2Ctf. The EMAN1Ctf is provided for backwards compatibility, so if particles processed in EMAN1 are read into EMAN2, they will have a valid CTF definition in their header.

The new EMAN2 CTF model is defined as follows:

Astigmatism is, at present, disabled/unused, but it is on my list of things to finalize just AFTER the workshop. You can certainly store the values for it there, but the generated curves won't contain it.

The parameters can be initialized as:

ctf=EMAN2Ctf() ctf.from_dict("defocus":2.5,"voltage":300.0", ...)

- or -

ctf.defocus=2.5 ctf.voltage=300.0

In an EMData() object:

img=EMData(256,256) ctf=EMAN2Ctf() ctf.from_dict("defocus":2.5,"voltage":300.0", ...) img.set_attr("ctf",ctf)

This image attribute can be archived in HDF and BDB format, but will be lost in other formats.

While these parameters can obviously be extracted from the CTF object itself, this is not the normal way of using these objects. Each Ctf object (other subclasses could be added) has two functions:

These functions return computed CTF-derived curves in 1-D or 2-D. In 1-D, specify the size of the returned array, and ds (the change in spatial frequency for each element, starting at 0 for the first). For 2-D you pass in a complex image of the desired dimensions, and its contents are replaced by the requested curve (in this case, the internal apix value is used to determine an appropriate ds). The struct_fact is not required for any current operations. CtfType is one of:

Ctf.CtfType. -->

For example, to pad (oversample) an image, and perform phase flipping, one could: