Xmipp  v3.23.11-Nereus
ctf_estimate_from_psd_base.h
Go to the documentation of this file.
1 /*
2  * ctf_estimate_from_psd_base.h
3  *
4  * Created on: Aug 29, 2017
5  * Author: javier mota <jmota@cnb.csic.es>
6  */
7 #ifndef _ADJUST_CTF_BASIC_PARAMS
8 #define _ADJUST_CTF_BASIC_PARAMS
9 
10 #include "core/xmipp_program.h"
11 #include "core/xmipp_filename.h"
12 #include "core/xmipp_image.h"
13 
18 {
19 public:
36  bool bootstrap;
44  double lambdaPhase;
48  double min_freq;
50  double max_freq;
52  double Tm;
54  double defocus_range;
56  double f1;
58  double f2;
83  std::vector<double> amplitud;
88  //Global values
89  // Autofocus
90  double value_th;
91  double min_freq_psd;
92  double max_freq_psd;
93 
94  // Maximum of the gaussian
96 
97  int show_inf; // 0: Do not show
98  // 1: Partially detailed
99  // 2: Very detailed
100 
101  // Program status
102  int action;
103  // 0: Computing the background (sqrt)
104  // 1: Computing the full background
105  // 2: Computing the envelope
106  // 3: Computing defoci
107  // 4: Computing all CTF parameters
108  // 5: Computing all CTF parameters + Gaussian2
109  // 6: Computing all CTF parameters + Gaussian2
110  // 7: Produce output
111 
112  double corr13;
113 
114  // Penalization factor for the background
115  bool penalize;
116 
117  // Speed up factor
119 
120  // Penalization for forbidden values of the parameters
123  static constexpr double penalty = 32.0; // Maximum penalization
124  //Some aliases
125  MultidimArray<double> *f; // The CTF to model
126  Matrix1D<double> *adjust_params; // Current theoretical adjustment
127 
129  {
130  }
131 
132 public:
134  void readParams();
135 
137  void readBasicParams(XmippProgram *program);
138 
140  void show();
141 
143  static void defineBasicParams(XmippProgram * program);
144 
146  void defineParams();
147 
149  void produceSideInfo();
150 
153  void generate_model_halfplane(int Ydim, int Xdim, MultidimArray<double> &model);
154 
157  void generate_model_quadrant(int Ydim, int Xdim, MultidimArray<double> &model);
158 
159 };
160 
161 double evaluateIceness(MultidimArray<double> &psd, double Tm);
163 #endif
double defocus_range
Defocus range.
double enhanced_weight
Weight of the enhanced image.
MultidimArray< double > * f
Image< double > ctftomodel
CTF amplitude to model.
bool fastDefocusEstimate
Fast defocus estimate.
void generate_model_quadrant(int Ydim, int Xdim, MultidimArray< double > &model)
int sizeWindowPhase
Size of the average window used during phase direction and unwrapping estimates (used in Zernike esti...
MultidimArray< double > w_digfreq
Matrix1D< double > * adjust_params
void readBasicParams(XmippProgram *program)
Read parameters.
void generate_model_halfplane(int Ydim, int Xdim, MultidimArray< double > &model)
MultidimArray< double > y_digfreq
double f1
Enhancement filter low freq.
double Tm
Sampling rate.
MultidimArray< double > w_digfreq_r_iN
double downsampleFactor
Downsample performed.
void show()
Show parameters.
MultidimArray< double > psd_exp_enhanced_radial_derivative
MultidimArray< double > psd_exp_enhanced_radial_2
FileName fn_psd
CTF filename.
MultidimArray< double > w_digfreq_r
double max_freq
Maximum frequency to adjust.
static constexpr double penalty
Image< double > enhanced_ctftomodel_fullsize
CTF amplitude to model.
int ctfmodelSize
X dimension of particle projections (-1=the same as the psd)
bool bootstrap
Bootstrap estimation.
MultidimArray< double > w_contfreq
MultidimArray< double > psd_theo_radial
MultidimArray< double > psd_exp_radial
PSD data.
bool noDefocusEstimate
No defocus estimate.
bool refineAmplitudeContrast
Refine amplitude contrast.
std::vector< double > amplitud
static void defineBasicParams(XmippProgram *program)
Define basic parameters.
double f2
Enhancement filter high freq.
bool show_optimization
Show convergence values.
MultidimArray< double > psd_theo_radial_derivative
void defineParams()
Define Parameters.
MultidimArray< double > x_digfreq
Matrix1D< double > adjust
Set of parameters for the complete adjustment of the CTF.
double evaluateIceness(MultidimArray< double > &psd, double Tm)
void produceSideInfo()
Produce side information.
int modelSimplification
Model simplification.
MultidimArray< double > mask_between_zeroes
double min_freq
Minimum frequency to adjust.
MultidimArray< std::complex< double > > psd_fft
Image< double > enhanced_ctftomodel
CTF amplitude to model.
void readParams()
Read parameters.
MultidimArray< double > psd_exp_radial_derivative
MultidimArray< double > x_contfreq
Frequencies in axes.
MultidimArray< double > psd_exp_enhanced_radial
double lambdaPhase
Regularization factor for the phase direction and unwrapping estimates (used in Zernike estimate) ...
MultidimArray< double > mask
Masks.
MultidimArray< double > w_count
MultidimArray< double > y_contfreq