Xmipp
v3.23.11-Nereus
|
#include <ml_tomo.h>
Classes | |
struct | AnglesInfo |
struct | MissingInfo |
Public Types | |
enum | MissingType { MISSING_WEDGE_Y, MISSING_WEDGE_X, MISSING_PYRAMID, MISSING_CONE } |
typedef std::vector< AnglesInfo > | AnglesInfoVector |
Public Member Functions | |
void | defineParams () |
Define the arguments accepted. More... | |
void | readParams () |
Read arguments from command line. More... | |
void | run () |
Main body of the program. More... | |
void | show () |
Show. More... | |
virtual void | produceSideInfo () |
Setup lots of stuff. More... | |
virtual void | generateInitialReferences () |
Generate initial references from random subset averages. More... | |
virtual void | setNumberOfLocalImages () |
Set the number of images, this function is useful only for MPI. More... | |
virtual void | produceSideInfo2 (int nr_vols=1) |
void | perturbAngularSampling () |
Calculate Angular sampling. More... | |
void | calculatePdfTranslations () |
Calculate probability density distribution for in-plane transformations. More... | |
void | readMissingInfo () |
void | getMissingRegion (MultidimArray< unsigned char > &Mmeasured, const Matrix2D< double > &A, const int missno) |
Get binary missing wedge (or pyramid) More... | |
void | maskSphericalAverageOutside (MultidimArray< double > &Min) |
void | reScaleVolume (MultidimArray< double > &Min, bool down_scale=true) |
void | postProcessVolume (Image< double > &Vin, double resolution=-1.) |
void | precalculateA2 (std::vector< Image< double > > &Iref) |
Fill vector of matrices with all rotations of reference. More... | |
void | expectationSingleImage (MultidimArray< double > &Mimg, int imgno, const int missno, double old_rot, std::vector< Image< double > > &Iref, std::vector< MultidimArray< double > > &wsumimgs, std::vector< MultidimArray< double > > &wsumweds, double &wsum_sigma_noise, double &wsum_sigma_offset, MultidimArray< double > &sumw, double &LL, double &dLL, double &fracweight, double &sumfracweight, double &trymindiff, int &opt_refno, int &opt_angno, Matrix1D< double > &opt_offsets) |
ML-integration over all hidden parameters. More... | |
void | maxConstrainedCorrSingleImage (MultidimArray< double > &Mimg, int imgno, int missno, double old_rot, std::vector< Image< double > > &Iref, std::vector< MultidimArray< double > > &wsumimgs, std::vector< MultidimArray< double > > &wsumweds, MultidimArray< double > &sumw, double &maxCC, double &sumCC, int &opt_refno, int &opt_angno, Matrix1D< double > &opt_offsets) |
Maximum constrained correlation search over all hidden parameters. More... | |
virtual void | expectation (MetaDataVec &MDimg, std::vector< Image< double > > &Iref, int iter, double &LL, double &sumfracweight, std::vector< MultidimArray< double > > &wsumimgs, std::vector< MultidimArray< double > > &wsumweds, double &wsum_sigma_noise, double &wsum_sigma_offset, MultidimArray< double > &sumw) |
Integrate over all experimental images. More... | |
void | maximization (std::vector< MultidimArray< double > > &wsumimgs, std::vector< MultidimArray< double > > &wsumweds, double &wsum_sigma_noise, double &wsum_sigma_offset, MultidimArray< double > &sumw, double &sumfracweight, double &sumw_allrefs, std::vector< MultidimArray< double > > &fsc, int iter) |
Update all model parameters. More... | |
void | calculateFsc (MultidimArray< double > &M1, MultidimArray< double > &M2, MultidimArray< double > &W1, MultidimArray< double > &W2, MultidimArray< double > &freq, MultidimArray< double > &fsc, double &resolution) |
Calculate resolution by FSC. More... | |
void | regularize (int iter) |
Apply regularization. More... | |
bool | checkConvergence (std::vector< double > &conv) |
check convergence More... | |
virtual void | addPartialDocfileData (const MultidimArray< double > &data, size_t first, size_t last) |
Add info of some processed images to later write to files. More... | |
virtual void | writeOutputFiles (const int iter, std::vector< MultidimArray< double > > &wsumweds, double &sumw_allrefs, double &LL, double &avefracweight, std::vector< double > &conv, std::vector< MultidimArray< double > > &fsc) |
Write out reference images, selfile and logfile. More... | |
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 (int verb=0) 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 () |
Additional Inherited Members | |
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 |
typedef std::vector<AnglesInfo> ProgMLTomo::AnglesInfoVector |
Enumerator | |
---|---|
MISSING_WEDGE_Y | |
MISSING_WEDGE_X | |
MISSING_PYRAMID | |
MISSING_CONE |
Definition at line 192 of file ml_tomo.h.
|
virtual |
Add info of some processed images to later write to files.
Definition at line 3363 of file ml_tomo.cpp.
void ProgMLTomo::calculateFsc | ( | MultidimArray< double > & | M1, |
MultidimArray< double > & | M2, | ||
MultidimArray< double > & | W1, | ||
MultidimArray< double > & | W2, | ||
MultidimArray< double > & | freq, | ||
MultidimArray< double > & | fsc, | ||
double & | resolution | ||
) |
Calculate resolution by FSC.
Definition at line 3137 of file ml_tomo.cpp.
void ProgMLTomo::calculatePdfTranslations | ( | ) |
Calculate probability density distribution for in-plane transformations.
Definition at line 1669 of file ml_tomo.cpp.
bool ProgMLTomo::checkConvergence | ( | std::vector< double > & | conv | ) |
check convergence
Definition at line 3321 of file ml_tomo.cpp.
|
virtual |
Define the arguments accepted.
Reimplemented from XmippProgram.
Definition at line 37 of file ml_tomo.cpp.
|
virtual |
Integrate over all experimental images.
Definition at line 2839 of file ml_tomo.cpp.
void ProgMLTomo::expectationSingleImage | ( | MultidimArray< double > & | Mimg, |
int | imgno, | ||
const int | missno, | ||
double | old_rot, | ||
std::vector< Image< double > > & | Iref, | ||
std::vector< MultidimArray< double > > & | wsumimgs, | ||
std::vector< MultidimArray< double > > & | wsumweds, | ||
double & | wsum_sigma_noise, | ||
double & | wsum_sigma_offset, | ||
MultidimArray< double > & | sumw, | ||
double & | LL, | ||
double & | dLL, | ||
double & | fracweight, | ||
double & | sumfracweight, | ||
double & | trymindiff, | ||
int & | opt_refno, | ||
int & | opt_angno, | ||
Matrix1D< double > & | opt_offsets | ||
) |
ML-integration over all hidden parameters.
Definition at line 1990 of file ml_tomo.cpp.
|
virtual |
Generate initial references from random subset averages.
Definition at line 894 of file ml_tomo.cpp.
void ProgMLTomo::getMissingRegion | ( | MultidimArray< unsigned char > & | Mmeasured, |
const Matrix2D< double > & | A, | ||
const int | missno | ||
) |
Get binary missing wedge (or pyramid)
Definition at line 1527 of file ml_tomo.cpp.
void ProgMLTomo::maskSphericalAverageOutside | ( | MultidimArray< double > & | Min | ) |
Definition at line 1730 of file ml_tomo.cpp.
void ProgMLTomo::maxConstrainedCorrSingleImage | ( | MultidimArray< double > & | Mimg, |
int | imgno, | ||
int | missno, | ||
double | old_rot, | ||
std::vector< Image< double > > & | Iref, | ||
std::vector< MultidimArray< double > > & | wsumimgs, | ||
std::vector< MultidimArray< double > > & | wsumweds, | ||
MultidimArray< double > & | sumw, | ||
double & | maxCC, | ||
double & | sumCC, | ||
int & | opt_refno, | ||
int & | opt_angno, | ||
Matrix1D< double > & | opt_offsets | ||
) |
Maximum constrained correlation search over all hidden parameters.
Definition at line 2424 of file ml_tomo.cpp.
void ProgMLTomo::maximization | ( | std::vector< MultidimArray< double > > & | wsumimgs, |
std::vector< MultidimArray< double > > & | wsumweds, | ||
double & | wsum_sigma_noise, | ||
double & | wsum_sigma_offset, | ||
MultidimArray< double > & | sumw, | ||
double & | sumfracweight, | ||
double & | sumw_allrefs, | ||
std::vector< MultidimArray< double > > & | fsc, | ||
int | iter | ||
) |
Update all model parameters.
Definition at line 2936 of file ml_tomo.cpp.
void ProgMLTomo::perturbAngularSampling | ( | ) |
Calculate Angular sampling.
Definition at line 1403 of file ml_tomo.cpp.
void ProgMLTomo::postProcessVolume | ( | Image< double > & | Vin, |
double | resolution = -1. |
||
) |
Definition at line 1791 of file ml_tomo.cpp.
void ProgMLTomo::precalculateA2 | ( | std::vector< Image< double > > & | Iref | ) |
Fill vector of matrices with all rotations of reference.
Definition at line 1875 of file ml_tomo.cpp.
|
virtual |
Setup lots of stuff.
Definition at line 644 of file ml_tomo.cpp.
|
virtual |
Read reference images in memory & set offset vectors (This produceSideInfo is Selfile-dependent!)
Definition at line 1077 of file ml_tomo.cpp.
void ProgMLTomo::readMissingInfo | ( | ) |
Read missing info from metadata this function will read the metadata with the missing info and set the number of missing regions
Definition at line 1436 of file ml_tomo.cpp.
|
virtual |
Read arguments from command line.
Reimplemented from XmippProgram.
Definition at line 237 of file ml_tomo.cpp.
void ProgMLTomo::regularize | ( | int | iter | ) |
Apply regularization.
Definition at line 3215 of file ml_tomo.cpp.
void ProgMLTomo::reScaleVolume | ( | MultidimArray< double > & | Min, |
bool | down_scale = true |
||
) |
Definition at line 1750 of file ml_tomo.cpp.
|
virtual |
Main body of the program.
Reimplemented from XmippProgram.
Definition at line 390 of file ml_tomo.cpp.
|
virtual |
Set the number of images, this function is useful only for MPI.
Definition at line 1064 of file ml_tomo.cpp.
void ProgMLTomo::show | ( | ) |
Show.
Definition at line 512 of file ml_tomo.cpp.
|
virtual |
Write out reference images, selfile and logfile.
Definition at line 3387 of file ml_tomo.cpp.
std::vector<double> ProgMLTomo::A2 |
AnglesInfoVector ProgMLTomo::all_angle_info |
std::vector<MissingInfo> ProgMLTomo::all_missing_info |
MultidimArray<double> ProgMLTomo::alpha_k |
double ProgMLTomo::ang_search |
double ProgMLTomo::angular_sampling |
std::vector<size_t> ProgMLTomo::convert_refno_to_stack_position |
bool ProgMLTomo::do_filter |
bool ProgMLTomo::do_generate_refs |
bool ProgMLTomo::do_keep_angles |
bool ProgMLTomo::do_limit_psirange |
bool ProgMLTomo::do_missing |
bool ProgMLTomo::do_only_average |
MultidimArray<double > ProgMLTomo::docfiledata |
bool ProgMLTomo::dont_align |
bool ProgMLTomo::dont_rotate |
bool ProgMLTomo::fix_fractions |
bool ProgMLTomo::fix_sigma_noise |
bool ProgMLTomo::fix_sigma_offset |
FileName ProgMLTomo::fn_sel |
MultidimArray<unsigned char> ProgMLTomo::fourier_imask |
MultidimArray<double> ProgMLTomo::fourier_mask |
std::vector<size_t> ProgMLTomo::imgs_id |
std::vector<int> ProgMLTomo::imgs_missno |
std::vector<Matrix1D<double> > ProgMLTomo::imgs_optoffsets |
std::vector<int> ProgMLTomo::imgs_optrefno |
std::vector< Image<double> > ProgMLTomo::Iref |
double ProgMLTomo::limit_trans |
MetaDataVec ProgMLTomo::MDimg |
bool ProgMLTomo::mdimg_contains_angles |
MetaDataVec ProgMLTomo::MDmissing |
MetaDataVec ProgMLTomo::MDref |
MultidimArray<double> ProgMLTomo::Mr2 |
size_t ProgMLTomo::myFirstImg |
int ProgMLTomo::Niter |
bool ProgMLTomo::no_SMALLANGLE |
double ProgMLTomo::noimp_threshold |
size_t ProgMLTomo::nr_images_global |
size_t ProgMLTomo::nr_images_local |
double ProgMLTomo::nr_mask_pixels |
MultidimArray<double> ProgMLTomo::P_phi |
MultidimArray<double> ProgMLTomo::real_mask |
MultidimArray<double> ProgMLTomo::real_omask |
double ProgMLTomo::sigma_noise |
double ProgMLTomo::sigma_offset |
FourierTransformer ProgMLTomo::transformer |
double ProgMLTomo::trymindiff_factor |