Xmipp
v3.23.11-Nereus
|
#include <mpi_ml_align2d.h>
Public Member Functions | |
MpiProgML2D () | |
MpiProgML2D (MpiNode *node) | |
void | setNumberOfLocalImages () |
void | produceSideInfo2 () |
void | writeOutputFiles (const ModelML2D &model, OutputType outputType=OUT_FINAL) |
Write model parameters. More... | |
void | expectation () |
After normal ML2D expectation, data must be collected from nodes. More... | |
void | endIteration () |
Redefine endIteration for some synchronization. More... | |
void | printModel (const String &msg, const ModelML2D &model) |
virtual void | usage (int verb=0) const |
Public Member Functions inherited from ProgML2D | |
void | readParams () |
Read arguments from command line. More... | |
void | defineParams () |
Params definition. More... | |
ProgML2D () | |
virtual void | show () |
Show info at starting program. More... | |
virtual void | produceSideInfo () |
Try to merge produceSideInfo1 and 2. More... | |
void | calculatePdfInplane () |
Calculate probability density distribution for in-plane transformations. More... | |
void | rotateReference () |
Fill vector of matrices with all rotations of reference. More... | |
void | reverseRotateReference () |
Apply reverse rotations to all matrices in vector and fill new matrix with their sum. More... | |
void | preselectLimitedDirections (double &phi, double &theta) |
void | preselectFastSignificant () |
void | expectationSingleImage (Matrix1D< double > &opt_offsets) |
ML-integration over all (or -fast) translations. More... | |
void | createThreads () |
Create working threads. More... | |
void | destroyThreads () |
Exit threads and free memory. More... | |
int | getThreadRefnoJob (int &refno) |
Assign refno jobs to threads. More... | |
void | awakeThreads (ThreadTask task, int start_refno, int load=1) |
Awake threads for different tasks. More... | |
void | doThreadRotateReferenceRefno () |
Thread code to parallelize refno loop in rotateReference. More... | |
void | doThreadReverseRotateReferenceRefno () |
Thread code to parallelize refno loop in reverseRotateReference. More... | |
void | doThreadPreselectFastSignificantRefno () |
Thread code to parallelize refno loop in preselectFastSignificant. More... | |
void | doThreadExpectationSingleImageRefno () |
Thread code to parallelize refno loop in expectationSingleImage. More... | |
void | doThreadESIUpdateRefno () |
Thread code to parallelize update loop in ESI. More... | |
virtual void | iteration () |
Perform an iteration. More... | |
void | maximizeModel (ModelML2D &model) |
Update all model parameters. More... | |
virtual void | maximization () |
Update all model parameters, adapted for IEM blocks use. More... | |
void | correctScaleAverage () |
Correct references scale. More... | |
virtual void | addPartialDocfileData (const MultidimArray< double > &data, size_t first, size_t last) |
Add docfiledata to docfile. More... | |
virtual void | readModel (ModelML2D &model, int block) |
Read model from file. More... | |
FileName | getBaseName (String suffix="", int number=-1) |
Get base name based on fn_root and some number. More... | |
Public Member Functions inherited from ML2DBaseProgram | |
void | initSamplingStuff () |
ML2DBaseProgram () | |
virtual void | randomizeImagesOrder () |
Randomize initial images order, only once. More... | |
virtual bool | checkConvergence () |
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) |
ParamDef * | getParamDef (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 () |
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 (const String ¶m, 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 Member Functions inherited from MpiML2DBase< MpiProgML2D > | |
void | readMpi (int argc, char **argv) |
MpiML2DBase (MpiProgML2D *prm) | |
MpiML2DBase (MpiProgML2D *prm, MpiNode *node) | |
MpiML2DBase (const MpiML2DBase &)=delete | |
MpiML2DBase (const MpiML2DBase &&)=delete | |
~MpiML2DBase () | |
MpiML2DBase & | operator= (const MpiML2DBase &)=delete |
MpiML2DBase & | operator= (const MpiML2DBase &&)=delete |
void | sendDocfile (const MultidimArray< double > &data) |
Additional Inherited Members | |
Public Attributes inherited from ProgML2D | |
bool | no_iem |
MultidimArray< int > | mask |
MultidimArray< int > | omask |
int | threadTask |
barrier_t | barrier |
barrier_t | barrier2 |
barrier_t | barrier3 |
pthread_t * | th_ids |
structThreadTasks * | threads_d |
double | LL |
double | sumfracweight |
double | wsum_sigma_noise |
double | wsum_sigma_offset |
double | sumw_allrefs |
std::vector< double > | sumw |
std::vector< double > | sumw2 |
std::vector< double > | sumwsc |
std::vector< double > | sumwsc2 |
std::vector< double > | sumw_mirror |
std::vector< MultidimArray< double > > | wsum_Mref |
MultidimArray< int > | Msignificant |
MultidimArray< double > | Mimg |
std::vector< double > | allref_offsets |
std::vector< double > | pdf_directions |
std::vector< MultidimArray< double > > | mref |
std::vector< MultidimArray< std::complex< double > > > | fref |
std::vector< MultidimArray< std::complex< double > > > | wsumimgs |
int | opt_refno |
int | iopt_psi |
int | iopt_flip |
double | trymindiff |
double | opt_scale |
double | bgmean |
double | opt_psi |
double | fracweight |
double | maxweight2 |
double | dLL |
std::vector< MultidimArray< std::complex< double > > > | Fimg_flip |
std::vector< MultidimArray< std::complex< double > > > | mysumimgs |
std::vector< double > | refw |
std::vector< double > | refw2 |
std::vector< double > | refwsc2 |
std::vector< double > | refw_mirror |
std::vector< double > | sumw_refpsi |
double | wsum_corr |
double | sum_refw |
double | sum_refw2 |
double | maxweight |
double | wsum_sc |
double | wsum_sc2 |
double | wsum_offset |
double | old_bgmean |
double | mindiff |
size_t | sigdim |
int | ioptx |
int | iopty |
std::vector< int > | ioptx_ref |
std::vector< int > | iopty_ref |
std::vector< int > | ioptflip_ref |
double | pfs_mindiff |
MultidimArray< double > | pfs_maxweight |
MultidimArray< double > | pfs_weight |
int | pfs_count |
std::vector< double > | A2 |
double | Xi2 |
size_t | refno_index |
size_t | refno_load_param |
int | refno_load |
int | refno_count |
int | mygroup |
Public Attributes inherited from ML2DBaseProgram | |
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 |
ModelML2D * | current_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 |
Protected Member Functions inherited from XmippProgram | |
void | defineCommons () |
Protected Attributes inherited from XmippProgram | |
int | errorCode |
ProgramDef * | progDef |
Program definition and arguments parser. More... | |
std::map< String, CommentList > | defaultComments |
int | argc |
Original command line arguments. More... | |
const char ** | argv |
Protected Attributes inherited from MpiML2DBase< MpiProgML2D > | |
MpiNode * | node |
bool | created_node |
MpiProgML2D * | program |
Class to parallelize the ML 2D alignment program
Definition at line 94 of file mpi_ml_align2d.h.
MpiProgML2D::MpiProgML2D | ( | ) |
Default constructor
Definition at line 86 of file mpi_ml_align2d.cpp.
MpiProgML2D::MpiProgML2D | ( | MpiNode * | node | ) |
Constructor passing the MpiNode
Definition at line 89 of file mpi_ml_align2d.cpp.
|
virtual |
Redefine endIteration for some synchronization.
Reimplemented from ML2DBaseProgram.
Definition at line 155 of file mpi_ml_align2d.cpp.
|
virtual |
After normal ML2D expectation, data must be collected from nodes.
Reimplemented from ProgML2D.
Definition at line 108 of file mpi_ml_align2d.cpp.
Reimplemented from ProgML2D.
Definition at line 176 of file mpi_ml_align2d.cpp.
|
virtual |
All mpi nodes should syncronize at this point that's why the need of override the implementation.
Reimplemented from ProgML2D.
Definition at line 100 of file mpi_ml_align2d.cpp.
|
virtual |
Only take a part of images for process
Reimplemented from ML2DBaseProgram.
Definition at line 94 of file mpi_ml_align2d.cpp.
|
virtual |
Print the usage of the program, reduced version
Reimplemented from XmippProgram.
Definition at line 182 of file mpi_ml_align2d.cpp.
|
virtual |
Write model parameters.
Reimplemented from ProgML2D.
Definition at line 162 of file mpi_ml_align2d.cpp.