Xmipp  v3.23.11-Nereus
Public Member Functions | Public Attributes | List of all members
ML2DBaseProgram Class Referenceabstract

#include <ml2d.h>

Inheritance diagram for ML2DBaseProgram:
Inheritance graph
[legend]
Collaboration diagram for ML2DBaseProgram:
Collaboration graph
[legend]

Public Member Functions

void initSamplingStuff ()
 
 ML2DBaseProgram ()
 
virtual void produceSideInfo ()=0
 Try to merge produceSideInfo1 and 2. More...
 
virtual void produceSideInfo2 ()=0
 Try to merge produceSideInfo1 and 2. More...
 
virtual void iteration ()=0
 
virtual void expectation ()=0
 Integrate over all experimental images. More...
 
virtual void endIteration ()
 Do some task at the end of iteration. More...
 
virtual void maximization ()=0
 Update all model parameters, adapted for IEM blocks use. More...
 
virtual void setNumberOfLocalImages ()
 Set the number of images, this function is useful only for MPI. More...
 
virtual void randomizeImagesOrder ()
 Randomize initial images order, only once. More...
 
virtual void createThreads ()
 Create working threads. More...
 
virtual void destroyThreads ()
 Exit threads and free memory. More...
 
virtual void writeOutputFiles (const ModelML2D &model, OutputType outputType=OUT_FINAL)=0
 Write output files. More...
 
virtual bool checkConvergence ()
 
virtual void addPartialDocfileData (const MultidimArray< double > &data, size_t first, size_t last)=0
 Add docfiledata to docfile. More...
 
virtual void run ()
 Main function of the program. More...
 
virtual void defineBasicParams (XmippProgram *prog)
 
virtual void defineAdditionalParams (XmippProgram *prog, const char *sectionLine)
 
virtual void defineHiddenParams (XmippProgram *prog)
 
- Public Member Functions inherited from XmippProgram
const char * getParam (const char *param, int arg=0)
 
const char * getParam (const char *param, const char *subparam, int arg=0)
 
int getIntParam (const char *param, int arg=0)
 
int getIntParam (const char *param, const char *subparam, int arg=0)
 
double getDoubleParam (const char *param, int arg=0)
 
double getDoubleParam (const char *param, const char *subparam, int arg=0)
 
float getFloatParam (const char *param, int arg=0)
 
float getFloatParam (const char *param, const char *subparam, int arg=0)
 
void getListParam (const char *param, StringVector &list)
 
int getCountParam (const char *param)
 
bool checkParam (const char *param)
 
bool existsParam (const char *param)
 
void addParamsLine (const String &line)
 
void addParamsLine (const char *line)
 
ParamDefgetParamDef (const char *param) const
 
virtual void quit (int exit_code=0) const
 
virtual int tryRun ()
 
void initProgress (size_t total, size_t stepBin=60)
 
void setProgress (size_t value=0)
 
void endProgress ()
 
void processDefaultComment (const char *param, const char *left)
 
void setDefaultComment (const char *param, const char *comment)
 
virtual void initComments ()
 
virtual void defineParams ()
 
virtual void readParams ()
 
void setProgramName (const char *name)
 
void addUsageLine (const char *line, bool verbatim=false)
 
void clearUsage ()
 
void addExampleLine (const char *example, bool verbatim=true)
 
void addSeeAlsoLine (const char *seeAlso)
 
void addKeywords (const char *keywords)
 
const char * name () const
 
virtual void usage (int verb=0) const
 
virtual void usage (const String &param, int verb=2)
 
int version () const
 
virtual void show () const
 
virtual void read (int argc, const char **argv, bool reportErrors=true)
 
virtual void read (int argc, char **argv, bool reportErrors=true)
 
void read (const String &argumentsLine)
 
 XmippProgram ()
 
 XmippProgram (int argc, const char **argv)
 
virtual ~XmippProgram ()
 

Public Attributes

FileName fn_img
 
FileName fn_ref
 
FileName fn_root
 
FileName fn_frac
 
FileName fn_sig
 
FileName fn_doc
 
FileName fn_oext
 
FileName fn_scratch
 
FileName fn_control
 
String cline
 
bool do_mirror
 
bool fix_fractions
 
bool fix_sigma_offset
 
bool fix_sigma_noise
 
int istart
 
int iter
 
int Niter
 
size_t dim
 
size_t dim2
 
size_t hdim
 
double ddim2
 
size_t nr_psi
 
size_t nr_flip
 
double psi_step
 
double psi_max
 
size_t nr_nomirror_flips
 
size_t nr_images_global
 
size_t nr_images_local
 
size_t myFirstImg
 
size_t myLastImg
 
double eps
 
MetaDataDb MDimg
 
MetaDataDb MDref
 
MetaDataDb MDlog
 
std::vector< Matrix2D< double > > F
 
std::vector< Image< double > > Iold
 
MultidimArray< double > P_phi
 
MultidimArray< double > Mr2
 
bool fast_mode
 
double C_fast
 
std::vector< Matrix1D< double > > Vtrans
 
bool zero_offsets
 
bool limit_rot
 
double search_rot
 
bool save_mem1
 
bool save_mem2
 
bool save_mem3
 
std::vector< double > imgs_oldphi
 
std::vector< double > imgs_oldtheta
 
bool do_ML3D
 
bool do_generate_refs
 
std::vector< std::vector< double > > imgs_offsets
 
double trymindiff_factor
 
double df
 
double df2
 
double dfsigma2
 
bool do_norm
 Re-normalize internally. More...
 
std::vector< double > imgs_scale
 
std::vector< double > imgs_bgmean
 
std::vector< double > imgs_trymindiff
 
std::vector< int > imgs_optrefno
 
double average_scale
 
int factor_nref
 
int refs_per_class
 
std::vector< double > conv
 
size_t current_image
 
ModelML2D model
 
ModelML2Dcurrent_model
 
size_t blocks
 
size_t current_block
 
std::vector< size_t > img_id
 
MultidimArray< double > docfiledata
 
bool do_restart
 
bool referenceExclusive
 
bool allowFastOption
 
bool allowThreads
 
bool allowIEM
 
bool allowRestart
 
String defaultRoot
 
int defaultNiter
 
int defaultStartingIter
 
int threads
 
String outRefsMd
 
MultidimArray< double > spectral_signal
 
int seed
 
- Public Attributes inherited from XmippProgram
bool doRun
 
bool runWithoutArgs
 
int verbose
 Verbosity level. More...
 
int debug
 

Additional Inherited Members

- Protected Member Functions inherited from XmippProgram
void defineCommons ()
 
- Protected Attributes inherited from XmippProgram
int errorCode
 
ProgramDefprogDef
 Program definition and arguments parser. More...
 
std::map< String, CommentListdefaultComments
 
int argc
 Original command line arguments. More...
 
const char ** argv
 

Detailed Description

MLalign2D parameters.

Definition at line 128 of file ml2d.h.

Constructor & Destructor Documentation

◆ ML2DBaseProgram()

ML2DBaseProgram::ML2DBaseProgram ( )

Definition at line 30 of file ml2d.cpp.

31 {
32  do_ML3D = false;
33  refs_per_class = 1;
34  defaultNiter = 100;
35  defaultRoot = "ml2d";
38  defaultNiter = 100;
39  blocks = 1;
40  factor_nref = 1;
41  outRefsMd = "";
42 }
int defaultNiter
Definition: ml2d.h:241
int refs_per_class
Definition: ml2d.h:217
bool referenceExclusive
Definition: ml2d.h:239
bool allowRestart
Definition: ml2d.h:239
String defaultRoot
Definition: ml2d.h:240
bool do_ML3D
Definition: ml2d.h:196
int factor_nref
Definition: ml2d.h:215
bool allowFastOption
Definition: ml2d.h:239
bool allowIEM
Definition: ml2d.h:239
String outRefsMd
Definition: ml2d.h:250
size_t blocks
Definition: ml2d.h:227
bool allowThreads
Definition: ml2d.h:239

Member Function Documentation

◆ addPartialDocfileData()

virtual void ML2DBaseProgram::addPartialDocfileData ( const MultidimArray< double > &  data,
size_t  first,
size_t  last 
)
pure virtual

Add docfiledata to docfile.

Implemented in ProgMLF2D, and ProgML2D.

◆ checkConvergence()

bool ML2DBaseProgram::checkConvergence ( )
virtual

Definition at line 119 of file ml2d.cpp.

120 {
121 //#define DEBUG_JM
122 #ifdef DEBUG_JM
123  std::cerr<<">>>>>>>> entering checkConvergence"<<std::endl;
124 #endif
125 
126  if (iter == 0)
127  return false;
128 
129  bool converged = true;
130  double convv, avg2;
132 
133  Maux.resize(dim, dim);
134  Maux.setXmippOrigin();
135 
136  conv.clear();
137 
138  for (int refno = 0; refno < model.n_ref; refno++)
139  {
140  convv = -1;
141 
142  if (model.Iref[refno].weight() > 0.)
143  {
144  Maux = Iold[refno]() * Iold[refno]();
145  avg2 = Maux.computeAvg();
146  if (avg2 > 0.)
147  {
148  convv = 1. / avg2;
149  Maux = Iold[refno]() - model.Iref[refno]();
150  Maux = Maux * Maux;
151  convv *= Maux.computeAvg();
152  if (convv > eps)
153  converged = false;
154  }
155  }
156  conv.push_back(convv);
157  }
158 
159 #ifdef DEBUG_JM
160  std::cerr<<"<<<<<< leaving checkConvergence"<<std::endl;
161 
162 #endif
163 #undef DEBUG_JM
164 
165  return converged;
166 }//close function checkConvergence
void resize(size_t Ndim, size_t Zdim, size_t Ydim, size_t Xdim, bool copy=true)
ModelML2D model
Definition: ml2d.h:224
int n_ref
Definition: ml2d.h:83
size_t dim
Definition: ml2d.h:151
std::vector< Image< double > > Iref
Definition: ml2d.h:85
double computeAvg() const
std::vector< Image< double > > Iold
Definition: ml2d.h:176
std::vector< double > conv
Definition: ml2d.h:219
double eps
Definition: ml2d.h:170

◆ createThreads()

virtual void ML2DBaseProgram::createThreads ( )
inlinevirtual

Create working threads.

Reimplemented in ProgML2D.

Definition at line 289 of file ml2d.h.

290  {}

◆ defineAdditionalParams()

void ML2DBaseProgram::defineAdditionalParams ( XmippProgram prog,
const char *  sectionLine 
)
virtual

Reimplemented in ProgMLF2D.

Definition at line 266 of file ml2d.cpp.

267 {
268  prog->addParamsLine(sectionLine);
269  prog->addParamsLine(" [ --eps <float=5e-5> ] : Stopping criterium");
270  prog->addParamsLine(formatString(" [ --iter <int=%d> ] : Maximum number of iterations to perform ", defaultNiter));
271  prog->addParamsLine(" [ --psi_step <float=5.> ] : In-plane rotation sampling interval [deg]");
272  prog->addParamsLine(" [ --noise <float=1> ] : Expected standard deviation for pixel noise ");
273  prog->addParamsLine(" [ --offset <float=3.> ] : Expected standard deviation for origin offset [pix]");
274  prog->addParamsLine(" [ --frac <docfile=\"\"> ] : Docfile with expected model fractions (default: even distr.)");
275  prog->addParamsLine(" [ -C <double=1e-12> ] : Significance criterion for fast approach ");
276  prog->addParamsLine(" [ --zero_offsets ] : Kick-start the fast algorithm from all-zero offsets ");
277  if (allowRestart)
278  prog->addParamsLine(" [ --restart <iter=1> ] : restart a run with all parameters as in the logfile ");
279  prog->addParamsLine(" [ --fix_sigma_noise ] : Do not re-estimate the standard deviation in the pixel noise ");
280  prog->addParamsLine(" [ --fix_sigma_offset ] : Do not re-estimate the standard deviation in the origin offsets ");
281  prog->addParamsLine(" [ --fix_fractions ] : Do not re-estimate the model fractions ");
282  prog->addParamsLine(" [ --student <df=6>] : Use t-distributed instead of Gaussian model for the noise ");
283  prog->addParamsLine(" : df = Degrees of freedom for the t-distribution ");
284  prog->addParamsLine(" [ --norm ] : Refined normalization parameters for each particle ");
285  prog->addParamsLine(" [ --save_memA ] : Save memory A(deprecated)");
286  prog->addParamsLine(" [ --save_memB ] : Save memory B(deprecated)");
287 
288 }
int defaultNiter
Definition: ml2d.h:241
bool allowRestart
Definition: ml2d.h:239
String formatString(const char *format,...)
void addParamsLine(const String &line)

◆ defineBasicParams()

void ML2DBaseProgram::defineBasicParams ( XmippProgram prog)
virtual

Divide the definition of params in several functions, also allowing other programs to include the ML2D params definition

Reimplemented in ProgMLF2D.

Definition at line 226 of file ml2d.cpp.

227 {
228  prog->addParamsLine(" -i <input_file> : Metadata or stack with input images ");
229 
230  String orStr = "", lb = "", rb = "";
231  if (!referenceExclusive)
232  {
233  orStr = "";
234  lb = "[";
235  rb = "]";
236  }
237  prog->addParamsLine(" [ --nref <int=1> ] : Number of references to generate automatically (recommended)");
238  prog->addParamsLine(" [ --ref <reference_file=\"\"> ] : Image, stack or metadata with initial(s) references(s)");
239 
240  prog->addParamsLine(formatString(" [ --oroot <rootname=%s> ] : Output rootname", defaultRoot.c_str()));
241  prog->addParamsLine(" [ --mirror ] : Also check mirror image of each reference ");
242 
243  if (allowFastOption)
244  {
245  prog->addParamsLine(" [ --fast ] : Use pre-centered images to pre-calculate significant orientations.");
246  prog->addParamsLine(":++ If this flag is set part of the integration over all references, rotations and translations is skipped.");
247  prog->addParamsLine(":++ The program will store all (=N_imgs*N_refs=) origin offsets that yield the maximum probability of observing");
248  prog->addParamsLine(":++ each experimental image, given each of the references. In the first iterations a complete integration over");
249  prog->addParamsLine(":++ all references, rotations and translations is performed for all images. In all subsequent iterations, for all");
250  prog->addParamsLine(":++ combinations of experimental images, references and rotations, the probability of observing the image given");
251  prog->addParamsLine(":++ the optimal origin offsets from the previous iteration is calculated. Then, if this probability is not");
252  prog->addParamsLine(":++ considered \"significant\", we assume that none of the other translations will be significant, and we skip");
253  prog->addParamsLine(":++ the integration over the translations. A combination of experimental image, reference and rotation is considered");
254  prog->addParamsLine(":++ as \"significant\" if the probability at the corresponding optimal origin offsets is larger than C times the");
255  prog->addParamsLine(":++ maximum of all these probabilities for that experimental image and reference (by default C=1e-12) This version");
256  prog->addParamsLine(":++ may run up to ten times faster than the original, complete-search approach, while practically identical results may be obtained.");
257 
258  }
259  if (allowThreads)
260  prog->addParamsLine(" [ --thr <N=1> ] : Use N parallel threads ");
261  if (allowIEM)
262  prog->addParamsLine(" [ --iem <blocks=1>] : Number of blocks to be used with IEM");
263 
264 }
bool referenceExclusive
Definition: ml2d.h:239
String defaultRoot
Definition: ml2d.h:240
bool allowFastOption
Definition: ml2d.h:239
bool allowIEM
Definition: ml2d.h:239
std::string String
Definition: xmipp_strings.h:34
String formatString(const char *format,...)
bool allowThreads
Definition: ml2d.h:239
void addParamsLine(const String &line)

◆ defineHiddenParams()

void ML2DBaseProgram::defineHiddenParams ( XmippProgram prog)
virtual

Definition at line 290 of file ml2d.cpp.

291 {
292  prog->addParamsLine("==+++++ Hidden arguments ==");
293  prog->addParamsLine(" [--scratch <scratch=\"\">]");
294  prog->addParamsLine(" [--debug <int=0>]");
295  prog->addParamsLine(" [--no_sigma_trick]");
296  prog->addParamsLine(" [--trymindiff_factor <float=0.9>]");
297  prog->addParamsLine(" [--random_seed <int=-1>]");
298  prog->addParamsLine(" [--search_rot <float=999.>]");
299  prog-> addParamsLine(" [--load <N=1>]");
300 
301  //fixme: only for debug
302  prog->addParamsLine("[--no_iem] : bla bla bla");
303 }
void addParamsLine(const String &line)

◆ destroyThreads()

virtual void ML2DBaseProgram::destroyThreads ( )
inlinevirtual

Exit threads and free memory.

Reimplemented in ProgML2D.

Definition at line 294 of file ml2d.h.

295  {}

◆ endIteration()

void ML2DBaseProgram::endIteration ( )
virtual

Do some task at the end of iteration.

Reimplemented in ProgMLF2D, MpiProgMLF2D, and MpiProgML2D.

Definition at line 168 of file ml2d.cpp.

169 {
170  // Write output files
173 }
Definition: ml2d.h:76
ModelML2D model
Definition: ml2d.h:224
size_t myLastImg
Definition: ml2d.h:168
size_t myFirstImg
Definition: ml2d.h:168
MultidimArray< double > docfiledata
Definition: ml2d.h:234
virtual void addPartialDocfileData(const MultidimArray< double > &data, size_t first, size_t last)=0
Add docfiledata to docfile.
virtual void writeOutputFiles(const ModelML2D &model, OutputType outputType=OUT_FINAL)=0
Write output files.

◆ expectation()

virtual void ML2DBaseProgram::expectation ( )
pure virtual

Integrate over all experimental images.

Implemented in ProgMLF2D, ProgML2D, MpiProgMLF2D, and MpiProgML2D.

◆ initSamplingStuff()

void ML2DBaseProgram::initSamplingStuff ( )

Set sampling stuff; flipping matrices, psi_step etc. Also create 0, 90, 180 & 270 degree flipping, as well as mirror

Definition at line 44 of file ml2d.cpp.

45 {
46  // Set sampling stuff: flipping matrices, psi_step etc.
47  Matrix2D<double> A(3, 3);
48  psi_max = 90.;
52  // 0, 90, 180 & 270 degree flipping, as well as mirror
53  A.initIdentity();
54  F.push_back(A);
55  A(0, 0) = 0.;
56  A(1, 1) = 0.;
57  A(1, 0) = 1.;
58  A(0, 1) = -1;
59  F.push_back(A);
60  A(0, 0) = -1.;
61  A(1, 1) = -1.;
62  A(1, 0) = 0.;
63  A(0, 1) = 0;
64  F.push_back(A);
65  A(0, 0) = 0.;
66  A(1, 1) = 0.;
67  A(1, 0) = -1.;
68  A(0, 1) = 1;
69  F.push_back(A);
70  if (do_mirror)
71  {
72  nr_flip = 8;
73  A.initIdentity();
74  A(0, 0) = -1;
75  F.push_back(A);
76  A(0, 0) = 0.;
77  A(1, 1) = 0.;
78  A(1, 0) = 1.;
79  A(0, 1) = 1;
80  F.push_back(A);
81  A(0, 0) = 1.;
82  A(1, 1) = -1.;
83  A(1, 0) = 0.;
84  A(0, 1) = 0;
85  F.push_back(A);
86  A(0, 0) = 0.;
87  A(1, 1) = 0.;
88  A(1, 0) = -1.;
89  A(0, 1) = -1;
90  F.push_back(A);
91  }
92  // Set limit_rot
93  limit_rot = (search_rot < 180.);
94 }
size_t nr_psi
Definition: ml2d.h:154
size_t nr_flip
Definition: ml2d.h:156
double psi_step
Definition: ml2d.h:158
double psi_max
Definition: ml2d.h:160
double search_rot
Definition: ml2d.h:190
bool limit_rot
Definition: ml2d.h:188
#define CEIL(x)
Definition: xmipp_macros.h:225
std::vector< Matrix2D< double > > F
Definition: ml2d.h:174
bool do_mirror
Definition: ml2d.h:137
size_t nr_nomirror_flips
Definition: ml2d.h:162

◆ iteration()

virtual void ML2DBaseProgram::iteration ( )
pure virtual

Implemented in ProgMLF2D, and ProgML2D.

◆ maximization()

virtual void ML2DBaseProgram::maximization ( )
pure virtual

Update all model parameters, adapted for IEM blocks use.

Implemented in ProgMLF2D, and ProgML2D.

◆ produceSideInfo()

virtual void ML2DBaseProgram::produceSideInfo ( )
pure virtual

Try to merge produceSideInfo1 and 2.

Implemented in ProgMLF2D, MpiProgMLF2D, and ProgML2D.

◆ produceSideInfo2()

virtual void ML2DBaseProgram::produceSideInfo2 ( )
pure virtual

Try to merge produceSideInfo1 and 2.

Implemented in ProgMLF2D, MpiProgMLF2D, ProgML2D, and MpiProgML2D.

◆ randomizeImagesOrder()

void ML2DBaseProgram::randomizeImagesOrder ( )
virtual

Randomize initial images order, only once.

Definition at line 96 of file ml2d.cpp.

97 {
98  //This static flag is for only randomize once
99  static bool randomized = false;
100 
101  if (!randomized)
102  {
103  std::mt19937 g(seed);
104  //-------Randomize the order of images
105  std::shuffle(img_id.begin(), img_id.end(), g);
106  randomized = true;
107  }
108 }//close function randomizeImagesOrder
std::vector< size_t > img_id
Definition: ml2d.h:232
doublereal * g

◆ run()

void ML2DBaseProgram::run ( )
virtual

Main function of the program.

Reimplemented from XmippProgram.

Definition at line 176 of file ml2d.cpp.

177 {
178  bool converged = false;
179  //CREATE_LOG(LOG_FN(fn_root));
180 
181  LOG(" starting produceSideInfo\n");
182  produceSideInfo();
183 
184  //Do some initialization work
185  LOG(" starting produceSideInfo2\n");
187 
188  //Create threads to be ready for work
189  LOG(" createThreads\n");
190  createThreads();
191 
192  LOG(" starting iterations\n");
193  // Loop over all iterations
194  for (iter = istart; !converged && iter <= Niter; iter++)
195  {
196  if (verbose)
197  std::cout << " Multi-reference refinement: iteration " << iter << " of " << Niter << std::endl;
198 
199  for (int refno = 0;refno < model.n_ref; refno++)
200  Iold[refno]() = model.Iref[refno]();
201 
202  //Perform an ML iteration
203  iteration();
204 
205  // Check convergence
206  converged = checkConvergence();
207 
208  // Do some task before ending iteration
209  endIteration();
210 
211  } // end loop iterations
212 
213  if (verbose)
214  {
215  std::cout << (converged ?
216  "--> Optimization converged!" :
217  "--> Optimization was stopped before convergence was reached!")
218  << std::endl;
219  }
220 
222  destroyThreads();
223  CLOSE_LOG();
224 }
virtual void produceSideInfo()=0
Try to merge produceSideInfo1 and 2.
ModelML2D model
Definition: ml2d.h:224
virtual void destroyThreads()
Exit threads and free memory.
Definition: ml2d.h:294
virtual void createThreads()
Create working threads.
Definition: ml2d.h:289
int n_ref
Definition: ml2d.h:83
virtual void iteration()=0
int istart
Definition: ml2d.h:145
int verbose
Verbosity level.
#define CLOSE_LOG()
#define LOG(msg)
std::vector< Image< double > > Iref
Definition: ml2d.h:85
virtual bool checkConvergence()
Definition: ml2d.cpp:119
virtual void produceSideInfo2()=0
Try to merge produceSideInfo1 and 2.
Definition: ml2d.h:76
std::vector< Image< double > > Iold
Definition: ml2d.h:176
virtual void endIteration()
Do some task at the end of iteration.
Definition: ml2d.cpp:168
virtual void writeOutputFiles(const ModelML2D &model, OutputType outputType=OUT_FINAL)=0
Write output files.

◆ setNumberOfLocalImages()

void ML2DBaseProgram::setNumberOfLocalImages ( )
virtual

Set the number of images, this function is useful only for MPI.

Reimplemented in MpiProgML2D.

Definition at line 110 of file ml2d.cpp.

111 {
113  //the following will be override in the MPI implementation.
114  // nr_images_local = divide_equally(nr_images_global, size, rank, myFirstImg,
115  // myLastImg);
116 }
size_t nr_images_local
Definition: ml2d.h:166
size_t nr_images_global
Definition: ml2d.h:164

◆ writeOutputFiles()

virtual void ML2DBaseProgram::writeOutputFiles ( const ModelML2D model,
OutputType  outputType = OUT_FINAL 
)
pure virtual

Write output files.

Implemented in ProgMLF2D, ProgML2D, MpiProgMLF2D, and MpiProgML2D.

Member Data Documentation

◆ allowFastOption

bool ML2DBaseProgram::allowFastOption

Definition at line 239 of file ml2d.h.

◆ allowIEM

bool ML2DBaseProgram::allowIEM

Definition at line 239 of file ml2d.h.

◆ allowRestart

bool ML2DBaseProgram::allowRestart

Definition at line 239 of file ml2d.h.

◆ allowThreads

bool ML2DBaseProgram::allowThreads

Definition at line 239 of file ml2d.h.

◆ average_scale

double ML2DBaseProgram::average_scale

Overall average scale (to be forced to one)

Definition at line 213 of file ml2d.h.

◆ blocks

size_t ML2DBaseProgram::blocks

Definition at line 227 of file ml2d.h.

◆ C_fast

double ML2DBaseProgram::C_fast

Fast mode

Definition at line 182 of file ml2d.h.

◆ cline

String ML2DBaseProgram::cline

Command line

Definition at line 134 of file ml2d.h.

◆ conv

std::vector<double> ML2DBaseProgram::conv

Store convergence

Definition at line 219 of file ml2d.h.

◆ current_block

size_t ML2DBaseProgram::current_block

Definition at line 229 of file ml2d.h.

◆ current_image

size_t ML2DBaseProgram::current_image

Definition at line 221 of file ml2d.h.

◆ current_model

ModelML2D * ML2DBaseProgram::current_model

Definition at line 224 of file ml2d.h.

◆ ddim2

double ML2DBaseProgram::ddim2

Definition at line 152 of file ml2d.h.

◆ defaultNiter

int ML2DBaseProgram::defaultNiter

Definition at line 241 of file ml2d.h.

◆ defaultRoot

String ML2DBaseProgram::defaultRoot

Definition at line 240 of file ml2d.h.

◆ defaultStartingIter

int ML2DBaseProgram::defaultStartingIter

Definition at line 241 of file ml2d.h.

◆ df

double ML2DBaseProgram::df

Degrees of freedom for the t-student distribution

Definition at line 204 of file ml2d.h.

◆ df2

double ML2DBaseProgram::df2

Definition at line 204 of file ml2d.h.

◆ dfsigma2

double ML2DBaseProgram::dfsigma2

Definition at line 204 of file ml2d.h.

◆ dim

size_t ML2DBaseProgram::dim

dimension of the images

Definition at line 151 of file ml2d.h.

◆ dim2

size_t ML2DBaseProgram::dim2

Definition at line 151 of file ml2d.h.

◆ do_generate_refs

bool ML2DBaseProgram::do_generate_refs

Flag for generation of initial models from random subsets

Definition at line 198 of file ml2d.h.

◆ do_mirror

bool ML2DBaseProgram::do_mirror

Flag for checking mirror images of all references

Definition at line 137 of file ml2d.h.

◆ do_ML3D

bool ML2DBaseProgram::do_ML3D

Flag for using ML3D

Definition at line 196 of file ml2d.h.

◆ do_norm

bool ML2DBaseProgram::do_norm

Re-normalize internally.

Flag to refine normalization of each experimental image

Definition at line 207 of file ml2d.h.

◆ do_restart

bool ML2DBaseProgram::do_restart

Flag for restart

Definition at line 236 of file ml2d.h.

◆ docfiledata

MultidimArray<double> ML2DBaseProgram::docfiledata

MultidimArray for mpi passing of docfiledata

Definition at line 234 of file ml2d.h.

◆ eps

double ML2DBaseProgram::eps

Stopping criterium

Definition at line 170 of file ml2d.h.

◆ F

std::vector<Matrix2D<double> > ML2DBaseProgram::F

vector for flipping (i.e. 90/180-degree rotations) matrices

Definition at line 174 of file ml2d.h.

◆ factor_nref

int ML2DBaseProgram::factor_nref

Number of (2D/3D) references to be generated

Definition at line 215 of file ml2d.h.

◆ fast_mode

bool ML2DBaseProgram::fast_mode

Fast mode

Definition at line 180 of file ml2d.h.

◆ fix_fractions

bool ML2DBaseProgram::fix_fractions

Flag whether to fix estimates for model fractions

Definition at line 139 of file ml2d.h.

◆ fix_sigma_noise

bool ML2DBaseProgram::fix_sigma_noise

Flag whether to fix estimate for sigma of noise

Definition at line 143 of file ml2d.h.

◆ fix_sigma_offset

bool ML2DBaseProgram::fix_sigma_offset

Flag whether to fix estimate for sigma of origin offset

Definition at line 141 of file ml2d.h.

◆ fn_control

FileName ML2DBaseProgram::fn_control

Definition at line 132 of file ml2d.h.

◆ fn_doc

FileName ML2DBaseProgram::fn_doc

Definition at line 132 of file ml2d.h.

◆ fn_frac

FileName ML2DBaseProgram::fn_frac

Definition at line 132 of file ml2d.h.

◆ fn_img

FileName ML2DBaseProgram::fn_img

Filenames reference selfile/image, fraction docfile & output rootname

Definition at line 132 of file ml2d.h.

◆ fn_oext

FileName ML2DBaseProgram::fn_oext

Definition at line 132 of file ml2d.h.

◆ fn_ref

FileName ML2DBaseProgram::fn_ref

Definition at line 132 of file ml2d.h.

◆ fn_root

FileName ML2DBaseProgram::fn_root

Definition at line 132 of file ml2d.h.

◆ fn_scratch

FileName ML2DBaseProgram::fn_scratch

Definition at line 132 of file ml2d.h.

◆ fn_sig

FileName ML2DBaseProgram::fn_sig

Definition at line 132 of file ml2d.h.

◆ hdim

size_t ML2DBaseProgram::hdim

Definition at line 151 of file ml2d.h.

◆ img_id

std::vector<size_t> ML2DBaseProgram::img_id

Definition at line 232 of file ml2d.h.

◆ imgs_bgmean

std::vector<double> ML2DBaseProgram::imgs_bgmean

Definition at line 209 of file ml2d.h.

◆ imgs_offsets

std::vector<std::vector<double> > ML2DBaseProgram::imgs_offsets

Vector to store optimal origin offsets (if not written to disc)

Definition at line 200 of file ml2d.h.

◆ imgs_oldphi

std::vector<double> ML2DBaseProgram::imgs_oldphi

Vectors to store old phi and theta for all images

Definition at line 194 of file ml2d.h.

◆ imgs_oldtheta

std::vector<double> ML2DBaseProgram::imgs_oldtheta

Definition at line 194 of file ml2d.h.

◆ imgs_optrefno

std::vector<int> ML2DBaseProgram::imgs_optrefno

Optimal refno from previous iteration

Definition at line 211 of file ml2d.h.

◆ imgs_scale

std::vector<double> ML2DBaseProgram::imgs_scale

Grey-scale correction values

Definition at line 209 of file ml2d.h.

◆ imgs_trymindiff

std::vector<double> ML2DBaseProgram::imgs_trymindiff

Definition at line 209 of file ml2d.h.

◆ Iold

std::vector< Image<double> > ML2DBaseProgram::Iold

Vector for images to hold references (new & old)

Definition at line 176 of file ml2d.h.

◆ istart

int ML2DBaseProgram::istart

Starting iteration

Definition at line 145 of file ml2d.h.

◆ iter

int ML2DBaseProgram::iter

Current iteration

Definition at line 147 of file ml2d.h.

◆ limit_rot

bool ML2DBaseProgram::limit_rot

Limit orientational searches

Definition at line 188 of file ml2d.h.

◆ MDimg

MetaDataDb ML2DBaseProgram::MDimg

MetaData files for experimental and reference images

Definition at line 172 of file ml2d.h.

◆ MDlog

MetaDataDb ML2DBaseProgram::MDlog

Definition at line 172 of file ml2d.h.

◆ MDref

MetaDataDb ML2DBaseProgram::MDref

Definition at line 172 of file ml2d.h.

◆ model

ModelML2D ML2DBaseProgram::model

Model

Definition at line 224 of file ml2d.h.

◆ Mr2

MultidimArray<double> ML2DBaseProgram::Mr2

Definition at line 178 of file ml2d.h.

◆ myFirstImg

size_t ML2DBaseProgram::myFirstImg

First and last images, useful for mpi

Definition at line 168 of file ml2d.h.

◆ myLastImg

size_t ML2DBaseProgram::myLastImg

Definition at line 168 of file ml2d.h.

◆ Niter

int ML2DBaseProgram::Niter

Number of iterations to be performed

Definition at line 149 of file ml2d.h.

◆ nr_flip

size_t ML2DBaseProgram::nr_flip

Number of operations in "flip-array" (depending on do_mirror)

Definition at line 156 of file ml2d.h.

◆ nr_images_global

size_t ML2DBaseProgram::nr_images_global

Total number of experimental images

Definition at line 164 of file ml2d.h.

◆ nr_images_local

size_t ML2DBaseProgram::nr_images_local

Total number of local mpi images

Definition at line 166 of file ml2d.h.

◆ nr_nomirror_flips

size_t ML2DBaseProgram::nr_nomirror_flips

Total number of no-mirror rotations in FOR_ALL_FLIPS

Definition at line 162 of file ml2d.h.

◆ nr_psi

size_t ML2DBaseProgram::nr_psi

Number of steps to sample in-plane rotation in 90 degrees

Definition at line 154 of file ml2d.h.

◆ outRefsMd

String ML2DBaseProgram::outRefsMd

This will be used for comunication from 2d and 3d. in the mlf_align2d case, also will be produced cref and noise references

Definition at line 250 of file ml2d.h.

◆ P_phi

MultidimArray<double> ML2DBaseProgram::P_phi

Matrices for calculating PDF of (in-plane) translations

Definition at line 178 of file ml2d.h.

◆ psi_max

double ML2DBaseProgram::psi_max

Total degrees in FOR_ALL_ROTATIONS

Definition at line 160 of file ml2d.h.

◆ psi_step

double ML2DBaseProgram::psi_step

Sampling rate for in-plane rotation

Definition at line 158 of file ml2d.h.

◆ referenceExclusive

bool ML2DBaseProgram::referenceExclusive

Some flags to params definitions

Definition at line 239 of file ml2d.h.

◆ refs_per_class

int ML2DBaseProgram::refs_per_class

Number of references per class, useful for 3D

Definition at line 217 of file ml2d.h.

◆ save_mem1

bool ML2DBaseProgram::save_mem1

Save memory options

Definition at line 192 of file ml2d.h.

◆ save_mem2

bool ML2DBaseProgram::save_mem2

Definition at line 192 of file ml2d.h.

◆ save_mem3

bool ML2DBaseProgram::save_mem3

Definition at line 192 of file ml2d.h.

◆ search_rot

double ML2DBaseProgram::search_rot

Limited search range for projection directions

Definition at line 190 of file ml2d.h.

◆ seed

int ML2DBaseProgram::seed

Definition at line 316 of file ml2d.h.

◆ spectral_signal

MultidimArray<double> ML2DBaseProgram::spectral_signal

This is only for MLF case

Definition at line 253 of file ml2d.h.

◆ threads

int ML2DBaseProgram::threads

Number of threads

Definition at line 244 of file ml2d.h.

◆ trymindiff_factor

double ML2DBaseProgram::trymindiff_factor

For initial guess of mindiff

Definition at line 202 of file ml2d.h.

◆ Vtrans

std::vector<Matrix1D<double> > ML2DBaseProgram::Vtrans

Offsets for limited translations

Definition at line 184 of file ml2d.h.

◆ zero_offsets

bool ML2DBaseProgram::zero_offsets

Start all optimal offsets from zero values

Definition at line 186 of file ml2d.h.


The documentation for this class was generated from the following files: