Bsoft  2.1.0
Bernard's software package
mg_ctf.h
Go to the documentation of this file.
1 
9 #include "mg_processing.h"
10 #include "rwimg.h"
11 
12 // Function prototypes
13 Bimage* img_ctf_calculate(CTFparam cp, int action, double wiener, Vector3<long> size,
14  Vector3<double> sam, double lores=0, double hires=0);
16 int img_ctf_apply(Bimage* p, CTFparam em_ctf, int action, double wiener,
17  double lores, double hires);
18 int img_ctf_apply(Bimage* p, CTFparam em_ctf, int action, double wiener,
19  double lores, double hires, fft_plan planf_2D, fft_plan planb_2D);
20 int img_ttf_apply(Bimage* p, CTFparam ctf, int action, double wiener,
21  Vector3<long> tile_size, double tilt, double axis, double res_lo, double res_hi);
22 int img_ctf_apply_to_proj(Bimage* proj, CTFparam em_ctf, double defocus, double res_lo, double res_hi, fft_plan planf_2D, fft_plan planb_2D);
23 int project_ctf_prepare(Bproject* project, int action, double lores,
24  double hires, Vector3<long> tile_size,
25  double def_start, double def_end, double def_inc,
26  Bstring& path, Bstring& newname, int flags);
27 int project_ctf(Bproject* project, int action, double lores,
28  double hires, Vector3<long> tile_size, double wiener,
29  DataType datatype, Bstring& partpath, Bstring& newname, int flags);
35 int project_set_defocus(Bproject* project, double def_avg,
36  double def_dev, double ast_angle);
38  double def_dev, double ast_angle);
40 int project_set_volts(Bproject* project, double volts);
41 int project_set_Cs(Bproject* project, double Cs);
42 int project_set_amp_shift(Bproject* project, double amp_shift);
43 int project_set_focal_length(Bproject* project, double focal_length);
44 int project_set_aperture(Bproject* project, double aperture);
45 int project_set_slit_width(Bproject* project, double slit);
46 int project_set_alpha(Bproject* project, double alpha);
48 int project_set_envelope(Bproject* project, int type, double* coeff);
51 int project_set_baseline(Bproject* project, int type, double* coeff);
53 int project_plot_ctf(Bproject* project, Bstring& filename);
54 
project_set_envelope
int project_set_envelope(Bproject *project, int type, double *coeff)
Sets the envelope equations of all the micrographs.
Definition: mg_ctf.cpp:1809
project_set_aperture
int project_set_aperture(Bproject *project, double aperture)
Sets the objective aperture of all the micrographs.
Definition: mg_ctf.cpp:1695
img_ctf_calculate
Bimage * img_ctf_calculate(CTFparam cp, int action, double wiener, Vector3< long > size, Vector3< double > sam, double lores=0, double hires=0)
Calculates a CTF complex image.
Definition: mg_ctf.cpp:45
project_merge_CTF_parameters
int project_merge_CTF_parameters(Bproject *project, Bproject *ctfproject)
Puts CTF parameters from one project into another.
Definition: mg_ctf.cpp:1383
project_update_ctf
int project_update_ctf(Bproject *project, JSvalue &jsctf)
Sets the acceleration voltage of all the micrographs.
Definition: mg_ctf.cpp:1548
img_wave_aberration
Bimage * img_wave_aberration(CTFparam cp, Vector3< long > size, Vector3< double > sam)
Calculates a wave aberration function.
Definition: mg_ctf.cpp:174
Bstring
Definition: Bstring.h:29
project_defocus_range
JSvalue project_defocus_range(Bproject *project)
Determines the minimum and maximum defocus values.
Definition: mg_ctf.cpp:1211
img_ctf_apply_to_proj
int img_ctf_apply_to_proj(Bimage *proj, CTFparam em_ctf, double defocus, double res_lo, double res_hi, fft_plan planf_2D, fft_plan planb_2D)
Applies a CTF to a projection image.
Definition: mg_ctf.cpp:354
project_update_first_zero
int project_update_first_zero(Bproject *project)
Updates the first zero from the defocus average for all the micrographs.
Definition: mg_ctf.cpp:1932
Vector3< long >
project_ctf
int project_ctf(Bproject *project, int action, double lores, double hires, Vector3< long > tile_size, double wiener, DataType datatype, Bstring &partpath, Bstring &newname, int flags)
Calculates or fits CTF curves to multiple power spectra.
Definition: mg_ctf.cpp:1119
project_set_baseline
int project_set_baseline(Bproject *project, int type, double *coeff)
Sets the baseline equations of all the micrographs.
Definition: mg_ctf.cpp:1902
project_set_volts
int project_set_volts(Bproject *project, double volts)
Sets the acceleration voltage of all the micrographs.
Definition: mg_ctf.cpp:1579
project_set_alpha
int project_set_alpha(Bproject *project, double alpha)
Sets the beam source size/divergence angle of all the micrographs.
Definition: mg_ctf.cpp:1752
project_ctf_average
int project_ctf_average(Bproject *project, Bstring &psname)
Calculates or fits CTF curves to multiple power spectra.
Definition: mg_ctf.cpp:1259
project
Bproject * project
Definition: bshow.cpp:33
project_plot_ctf
int project_plot_ctf(Bproject *project, Bstring &filename)
Plots the CTF curves.
Definition: mg_ctf.cpp:1967
project_set_astigmatism
int project_set_astigmatism(Bproject *project, double def_dev, double ast_angle)
Sets the defocus deviation and astigmatism angle of all the micrographs.
Definition: mg_ctf.cpp:1514
Bimage
General image parameter class.
Definition: Bimage.h:177
Bproject
Definition: mg_processing.h:336
JSvalue
Definition: json.h:53
project_ctf_prepare
int project_ctf_prepare(Bproject *project, int action, double lores, double hires, Vector3< long > tile_size, double def_start, double def_end, double def_inc, Bstring &path, Bstring &newname, int flags)
Calculates power spectra and optionally fits CTF curves.
Definition: mg_ctf.cpp:719
project_set_baseline_type
int project_set_baseline_type(Bproject *project, int type)
Sets the baseline type of all the micrographs.
Definition: mg_ctf.cpp:1872
img_ctf_apply
int img_ctf_apply(Bimage *p, CTFparam em_ctf, int action, double wiener, double lores, double hires)
Applies or corrects for the contrast transfer function (CTF).
Definition: mg_ctf.cpp:237
img_ttf_apply
int img_ttf_apply(Bimage *p, CTFparam ctf, int action, double wiener, Vector3< long > tile_size, double tilt, double axis, double res_lo, double res_hi)
Applies or corrects for the tilted contrast transfer function (TTF).
Definition: mg_ctf.cpp:388
CTFparam
Definition: ctf.h:28
rwimg.h
Header file for 2D and 3D image I/O.
project_CTF_to_part
int project_CTF_to_part(Bproject *project)
Transfers CTF parameters from micrographs to particles.
Definition: mg_ctf.cpp:1422
mg_processing.h
Header file for micrograph processing.
fft_plan
fftwf_plan fft_plan
Definition: fft.h:20
project_set_envelope_type
int project_set_envelope_type(Bproject *project, int type)
Sets the envelope type of all the micrographs.
Definition: mg_ctf.cpp:1780
project_set_amp_shift
int project_set_amp_shift(Bproject *project, double amp_shift)
Sets the amplitude contribution of all the micrographs.
Definition: mg_ctf.cpp:1638
DataType
DataType
Base data type specifier.
Definition: utilities.h:150
project_powerspectrum_average
Bimage * project_powerspectrum_average(Bproject *project, double deftarget)
Averages multiple power spectra based on defocus estimates.
Definition: mg_ctf.cpp:1332
project_set_coherence_envelope
int project_set_coherence_envelope(Bproject *project)
Replaces envelope equations with those based on partial coherence in all micrographs.
Definition: mg_ctf.cpp:1844
project_set_slit_width
int project_set_slit_width(Bproject *project, double slit)
Sets the energy filter slit width of all the micrographs.
Definition: mg_ctf.cpp:1724
project_set_focal_length
int project_set_focal_length(Bproject *project, double focal_length)
Sets the focal length of all the micrographs.
Definition: mg_ctf.cpp:1666
project_set_defocus
int project_set_defocus(Bproject *project, double def_avg, double def_dev, double ast_angle)
Sets the defocus values of all the micrographs.
Definition: mg_ctf.cpp:1463
project_set_Cs
int project_set_Cs(Bproject *project, double Cs)
Sets the spherical aberation constant of all the micrographs.
Definition: mg_ctf.cpp:1609