- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Assign_CTF
This program allows you to estimate the CTF for each single particle projection. The estimation of the CTF is performed in two steps:
1 the power spectrum density (PSD) must be estimated 1 a theoretical model of the CTF is adjusted to the PSD.
This second step is performed by xmipp_ctf_estimate_from_psd but this program is seldom called directly by the user. Instead, this program is in charge of calling it with the right parameters. The estimation of the PSD can be performed either by periodogram averaging or by ARMA models (the size of the piece on which the ARMA model is computed should be at least 10 times the order of the ARMA model). Periodogram averaging is a fast technique to estimate PSD. Its drawback is its noisy nature. On the other hand, ARMA models suffer less from noise, although they are much slower to compute.
The algorithmic details of the program can be seen at http://biocomp.cnb.uam.es/~coss/Articulos/Sorzano2007a.pdf
Depending on where the PSD is estimated we distinguish four working modes:
I. Micrograph based
The micrograph is divided into overlapping pieces (with an overlapping factor of 50%, if the size of the micrograph is not a multiple of half the size of the piece, the last two pieces will overlap a few pixels more). A typical size of this pieces are 512x512 pixels. The PSD is estimated for each piece (this estimation in turn can be performed by averaging in subpieces). The PSD estimates of all pieces are averaged and, then, a CTF model is fitted. This results in a unique CTF for the whole micrograph. Use this working mode if the assumption of unique CTF is valid.
Assuming that the micrograph is named[micrograph].raw, this working mode will produce the following outputs:
- 
[micrograph]_[PSDmode]avg.psdPSD estimate for the whole micrograph - 
[micrograph]_[PSDmode]avg.ctfmodelImage for easy comparison of the PSD estimate and the CTF model - 
[micrograph]_[PSDmode]avg.ctfparamParametric model of the CTF 
PSDmode can be eitherPeriodogram orARMA depending on which PSD estimator is used.
II. Region based
The micrograph is divided into non-overlapping pieces (except for the last two which might have to overlap if the micrograph size is not a multiple of the piece size). A typical piece size is 512x512 pixels. The PSD is estimated for each piece and the corresponding CTF model fitted. This results in as many CTF models as pieces. Each particle is assigned the CTF model of the piece where it was located within the micrograph. This option is a compromise between speed to compute the CTF models and the accuracy of having a precise CTF model for each particle.
Assuming that the micrograph is named[micrograph.raw], this working mode will produce the following outputs:
- 
[micrograph]_[PSDmode][n].psdPSD estimate for piece [n] - 
[micrograph]_[PSDmode][n].ctfmodelImage for easy comparison of the PSD estimate and the CTF model - 
[micrograph]_[PSDmode][n].ctfparamParametric model of the CTF 
[PSDmode] can be eitherPeriodogram orARMA depending on which PSD estimator is used. [n] is a number that goes from 1 to the total number of pieces in the micrograph.
III. Particle based
A piece (of typical size 512x512) is centered at the location of each particle. The PSD and CTF are estimated for each one of these pieces resulting in as many CTF models as particles. This working mode provides a precise knowledge of the CTF of each particle, at the cost of a high computational price.
Assuming that the particles are named[particle_name].xmp, for each particle the following files are produced:
- 
[particle_name].psdPSD estimate for the given particle - 
[particle_name].ctfmodelImage for easy comparison of the PSD estimate and the CTF model - 
[particle_name].ctfparamParametric model of the CTF 
IV. Selfile based
If you don't have a micrograph, but a set of images (in a selfile) coming from that micrograph. You can compute the PSD and the CTF as if you were working with the micrograph itself (that is, "micrograph based" mode). A single CTF will be produced for all images in the selfile.
Assuming that the selfile is called[selfile].sel, the following files will be produced:
- 
[selfile].ctfdatctfdat file with the CTF for each particle (since there is a single CTF per micrograph, all lines in this file are the same) - 
[selfile]_[PSDmode]avg.psdPSD estimate for the whole micrograph - 
[selfile]_[PSDmode]avg.ctfmodelImage for easy comparison of the PSD estimate and the CTF model - 
[selfile]_[PSDmode]avg.ctfparamParametric model of the CTF 
For all working modes
For all working modes, if a selfile with the particles of the micrograph and the corresponding positions within the micrograph are provided, a selfile of corresponding CTF models.ctfparam is returned. This file takes into account the working mode and produce the CTF list accordingly. Assuming that the particle selfile is named[selfile].sel, then the name of the output CTF selfile is[selfile].ctfdat.
The correction of the CTF must be first done byCorrectPhase for correcting the phase. Then, the amplitude can be corrected using either IDR_ART or an unbalanced version of ART.
When the estimation of the CTF is done by regions, it can be nicely coupled toMark in order to know from which regions particles should be picked. For doing so, you must provide the parameter file used for assign_CTF. Then, the micrograph as well as another window with the same micrograph shape showing the region-based CTFs will be shown. In this way, particles from regions where the CTF is too astigmatic, or badly defocused can be avoided. See the examples below to learn how to invoke it.
Show is also prepared to show.ctfmodel and.psd files (as well as selfiles of these types). Showing the CTF assignment is particularly useful to check whether we are satisfied with the assignment or not. Moreover, Show allows to recompute the CTF at those regions where the CTF fitting (second step of the CTF detection) failed. Show will visually allow you to better constraint the problem so that the CTF can be successfully be carried out.
If the CTF estimation process went wrong you can recompute the CTF providing some manual information about the location of the Thon rings. This can be done by launchingMarkForMarkingTheMicrographWithASpecialParameterTellingMark which is the CTF of that micrograph.
$ xmipp_mark -i micrograph.raw -ctf assign_CTF.prm
Note that assign_CTF.prm is the input file to ctf_estimate_from_micrograph, not its output.
You can find more information atEstimateTheCTF
$ ctf_estimate_from_micrograph -i [parameters file]
Parameters
- `` File containing the real parameters to the program
 
Parameters file
- `` Any of theSpARMA parameters
 - `` Any of theAdjust_CTF parameters
 - `` Any of the CTF and CTFnoise parameters (seeFourierFilter, used as a starting point)
 - 
reverse_endianyes = Reverse the endian of the input micrograph.- Use this flag if you receive a message with
No convergence in 30 SVDCMP iterations 
 - Use this flag if you receive a message with
 - 
N_horizontal[Xdim] = Size of the pieces into which the micrograph is split - 
N_vertical[ydim=xdim] = Size of the pieces into which the micrograph is split - 
particle_horizontal[Xdim=N_horizontal] = Size of the projection images for which the CTF is to be computed. The output .ctfmodel will be of this size. - 
particle_vertical[Ydim=N_vertical] = Size of the projection images for which the CTF is to be computed - 
image[micrograph filename] = Filename of the micrograph for which the CTF will be estimated. The micrograph must be in RAW format - 
selfile[selfile] = Selfile with the projection filenames coming from this micrograph. The projections themselves will not be used. An output selfile with the corresponding CTF of each particle will be returned. - 
picked[posfile] = This is the file with the positions of the centers of the corresponding projections as given byMark. It is very important that there are as many positions as projection filenames in the selfile. - 
compute_at_particleyes = Estimate each CTF in a window centered on the selected particles . Positions are read from the.posfile. If this option is active the selfile of theselfileoption must have the same number of entries as the.posfile - 
micrograph_averagingyes = The micrograph is always divided into pieces (either overlapping or not, depending on the working mode). Use this option to average all the PSD estimations of all pieces from the micrograph - 
piece_averagingyes - 
Nside_piece[N=5] = Defines the number of subpieces inside each piece - 
periodogramyes = Use this option to perform a periodogram estimation of the PSD instead of the ARMA - 
dont_adjust_CTFyes = Use this option to compute only the power spectra and not fitting the theoretical CTF. If this option is given, then the Adjust_CTF parameters are not needed - 
bootstrapN[N=-1] = Defines the number of bootstrap samples for estimating the CTF variance. Recommended number: 1000. 
I. Micrograph based
The following command allows you to estimate the CTF in this mode
$ ctf_estimate_from_micrograph -i 1691_assign_CTF.prm
where1691_assign_CTF.prm is
# Assign CTF parameters
image=1691.raw
selfile=1691.raw.Common.sel
picked=1691.raw.Common.pos
N_horizontal=512
particle_horizontal=150
micrograph_averaging=yes
periodogram=yes
# CTF parameters
voltage=200
spherical_aberration=2
sampling_rate=3.27
defocusU=-5000
The key parameter in the previous file ismicrograph_averagingyes=. Pieces will not be subdivided into subpieces since there will be enough data to average for the full micrograph. To look (and possibly recompute) the assignment you might use
$ xmipp_mark -i 1691.raw -ctf 1691_assign_CTF.prm
II. Region based
The following command allows you to estimate the CTF in this mode
$ ctf_estimate_from_micrograph -i 1691_assign_CTF.prm
where1691_assign_CTF.prm is
# Assign CTF parameters
image=1691.raw
selfile=1691.raw.Common.sel
picked=1691.raw.Common.pos
N_horizontal=512
particle_horizontal=150
piece_averaging=yes
periodogram=yes
# CTF parameters
voltage=200
spherical_aberration=2
sampling_rate=3.27
defocusU=-5000
Since, for each piece, a single PSD estimate will be too noisy, we will average 5x5 (Nside_piece x Nside_piece) overlapping pieces of size 205x205 (2YSIZE(piece)/Nside_piece x 2XSIZE(piece)/Nside_piece). To look (and possibly recompute) the assignment you might use
$ xmipp_mark -i 1691.raw -ctf 1691_assign_CTF.prm
III. Particle based
The following command allows you to estimate the CTF in this mode
$ ctf_estimate_from_micrograph -i 1691_assign_CTF.prm
where1691_assign_CTF.prm is
# Assign CTF parameters
image=1691.raw
selfile=1691.raw.Common.sel
picked=1691.raw.Common.pos
N_horizontal=512
particle_horizontal=150
piece_averaging=yes
compute_at_particle=yes
periodogram=yes
# CTF parameters
voltage=200
spherical_aberration=2
sampling_rate=3.27
defocusU=-5000
The key parameter this time iscompute_at_particleyes=. Again, since for each piece a single PSD estimate will be too noisy, we will average 5x5 (Nside_piece x Nside_piece) overlapping pieces of size 205x205 (2YSIZE(piece)/Nside_piece x 2XSIZE(piece)/Nside_piece). To look (and possibly recompute) the assignment you might use
$ xmipp_show -ctfsel 1691.raw.Common.ctf.sel -assign 1691_assign_CTF.prm
IV. Selfile based
The following command allows you to estimate the CTF in this mode
$ ctf_estimate_from_micrograph -i 1691_assign_CTF.prm
where1691_assign_CTF.prm is
# Assign CTF parameters
selfile=1691.sel
N_horizontal=256
periodogram=yes
# CTF parameters
voltage=200
spherical_aberration=2
sampling_rate=3.27
defocusU=-5000
The key parameter this time isselfile1691.sel= without anyimage[micrograph]=. Again, since for each piece a single PSD estimate will be too noisy, we will average 5x5 (Nside_piece x Nside_piece) overlapping pieces of size 102x102 (2YSIZE(piece)/Nside_piece x 2XSIZE(piece)/Nside_piece). To look (and possibly recompute) the assignment you might use
$ xmipp_show -ctf 1691_Periodogramavg.ctfmodel -assign 1691_assign_CTF.prm
--Main.AlfredoSolano - 16 Jan 2007