Xmipp  v3.23.11-Nereus
angular_continuous_assign2.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Carlos Oscar Sanchez Sorzano coss@cnb.csic.es
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 
26 #ifndef _PROG_ANGULAR_PREDICT_CONTINOUOS2
27 #define _PROG_ANGULAR_PREDICT_CONTINUOUS2
28 
30 #include "core/multidim_array.h"
31 #include "core/xmipp_image.h"
32 #include "data/fourier_filter.h"
34 
35 class FourierProjector;
36 
40 
41 constexpr int CONTCOST_CORR = 0;
42 constexpr int CONTCOST_L1 = 1;
43 
44 
47 {
48 public:
56  double maxShift;
58  double maxScale;
62  double maxResol;
66  double maxA;
68  double maxB;
70  double Ts;
72  int Rmax;
74  int pad;
75  // Optimize gray
77  // Optimize shift
79  // Optimize scale
81  // Optimize angles
83  // Optimize defocus
85  // Ignore CTF
86  bool ignoreCTF;
87  // Apply transformation to this image
89  // Phase Flipped
91  // Penalization for the average
92  // double penalization;
93 
94  // Force defocusU = defocusV
96 
97 public:
98  // Rank (used for MPI version)
99  int rank;
100 
101  // 2D mask in real space
103  // Inverse of the sum of Mask2D
104  double iMask2Dsum;
105  // Fourier projector
107  // Volume size
108  size_t Xdim;
109  // Input image
111  // Theoretical projection
113  // Filter
115  // Transformation matrix
117  // Original angles
119  // Original shift
121  // Original flip
122  bool old_flip;
123  // Original gray scale
125  // Has CTF
126  bool hasCTF;
127  // Original defocus
129  // CTF
131  // Covariance matrices
133  // Image stddev
134  double Istddev;
135  // Continuous cost function
136  int contCost;
137  // Current defoci
139  // CTF image
141  std::unique_ptr<MultidimArray<double>> ctfEnvelope;
142  // Fourier Transformer
144  // Fourier transforms
146 public:
149 
152 
154  void readParams();
155 
157  void show();
158 
160  void defineParams();
161 
163  void startProcessing();
164 
167  void preProcess();
168 
172  void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut);
173 
175  void updateCTFImage(double defocusU, double defocusV, double angle);
176 
178  void postProcess();
179 };
181 #endif
std::unique_ptr< MultidimArray< double > > ctfEnvelope
ProgAngularContinuousAssign2()
Empty constructor.
constexpr int CONTCOST_L1
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
void readParams()
Read argument from command line.
std::string String
Definition: xmipp_strings.h:34
MultidimArray< std::complex< double > > fftE
void updateCTFImage(double defocusU, double defocusV, double angle)
constexpr int CONTCOST_CORR