33#define eman_cmp__h__ 1
164 return "Cross-correlation coefficient (default -1 * ccc)";
176 d.
put(
"negative",
EMObject::INT,
"If set, returns -1 * ccc product. Set by default so smaller is better");
198 return "L^1 normalized difference (positive by default)";
210 d.
put(
"negative",
EMObject::INT,
"If set (which is the default), returns Lod. (The smaller the better)");
211 d.
put(
"normalize",
EMObject::INT,
"If set, normalizes maps prior to computing the difference. Default=0 (no normalization)");
239 return "Squared Euclidean distance (sum(a - b)^2)/n.";
251 d.
put(
"zeromask",
EMObject::INT,
"If set, zero pixels in either image will be excluded from the statistics");
252 d.
put(
"normto",
EMObject::INT,
"If set, 'with' is normalized to 'this' before computing the distance");
280 return "Dot product (default -1 * dot product)";
291 d.
put(
"negative",
EMObject::INT,
"If set, returns -1 * dot product. Set by default so smaller is better");
292 d.
put(
"normalize",
EMObject::INT,
"If set, returns normalized dot product (cosine of the angle) -1.0 - 1.0.");
325 return "Ccc with consideration given for the missing wedge";
336 d.
put(
"norm",
EMObject::BOOL,
"Whether the cross correlation image should be normalized (should be for normalized images). Default is true.");
337 d.
put(
"ccf",
EMObject::EMDATA,
"The ccf image, can be provided if it already exists to avoid recalculating it");
338 d.
put(
"normalize",
EMObject::EMDATA,
"Return the negative value (which is EMAN2 convention), Defalut is true(1)");
339 d.
put(
"searchx",
EMObject::INT,
"The maximum range of the peak location in the x direction. Default is sizex/4");
340 d.
put(
"searchy",
EMObject::INT,
"The maximum range of the peak location in the y direction. Default is sizey/4");
341 d.
put(
"searchz",
EMObject::INT,
"The maximum range of the peak location in the z direction. Default is sizez/4");
364 return "Ccc of two FFTs with missing wedge taken into account explicitly. Also stores overlap as 'fft_overlap' in \
365first input image. Individual voxels are include only if they exceed the threshold value in both images. fft_overlap expresses \
366the fractional number of voxels included in the comparison. Actual returned correlations already account for this effect, but \
367the overlap can be used to estimate the relative uncertainty in the resulting correlation coefficient.";
380 d.
put(
"sigmaimg",
EMObject::FLOAT,
"Sigma coefficient for thresholding values included in the dot product. default = 0.5");
381 d.
put(
"sigmawith",
EMObject::FLOAT,
"Sigma coefficient for thresholding values included in the dot product in the 'with' image. Default = 0.5");
382 d.
put(
"negative",
EMObject::INT,
"If set, returns -1 * ccc product. Set by default so smaller is better");
405 return "FSC of two FFTs with missing wedge taken into account via a dynamic threshold. Also stores overlap as 'fft_overlap' in \
406first input image on return. This comparator can take the missing wedge into account automatically without any precomputation of wedge \
407orientation. If sigmaimg and/or sigmawith are provided, they must contain floating point arrays with at least as many elements as the \
408Fourier radius in pixels, and these curves represent the thresholds for each image for including the values in the FSC, or considering them \
409to be missing values. If not provided, these values will be computed automatically. These options are primarily provided for speed.";
422 d.
put(
"sigmaimg",
EMObject::FLOATARRAY,
"Res dependent amplitude threshold. If provided this must contain a floating point array with as many elements as the Fourier radius of the image. ");
423 d.
put(
"sigmawith",
EMObject::FLOATARRAY,
"Resolution dependent coefficient for thresholding values included in the dot product in the 'with' image. Default = 0.1 and is normally fine");
424 d.
put(
"sigmaimgval",
EMObject::FLOAT,
"Sigma coefficient for thresholding values included in the dot product. default = 0.5");
425 d.
put(
"sigmawithval",
EMObject::FLOAT,
"Sigma coefficient for thresholding values included in the dot product in the 'with' image. Default = 0.5");
426 d.
put(
"minres",
EMObject::FLOAT,
"The minimum resolution to accept (1/A) Default is 3 pixels. overwrites pmin");
427 d.
put(
"maxres",
EMObject::FLOAT,
"The maximum resolution to accept (1/A) Default is axial Nyquist. overwrites pmax");
459 return "EXPERIMENTAL - Fsc with consideration given for the missing wedge. Not ready for routine use.";
470 d.
put(
"normalize",
EMObject::EMDATA,
"Return the negative value (which is EMAN2 convention), Defalut is true(1)");
471 d.
put(
"sigmas",
EMObject::FLOAT,
"The number of times the standard deviation of Fourier amplitudes to accept");
472 d.
put(
"minres",
EMObject::FLOAT,
"The minimum resolution to accept (1/A) Default is inf");
473 d.
put(
"maxres",
EMObject::FLOAT,
"The maximum resolution to accept (1/A) Default=0.0");
474 d.
put(
"apix",
EMObject::FLOAT,
"The angstroms per pixel to use. Default = apix_x(1.0 if not present)");
500 return "Calculates dot product for each quadrant and returns worst value (default -1 * dot product)";
511 d.
put(
"negative",
EMObject::INT,
"If set, returns -1 * dot product. Default = true (smaller is better)");
512 d.
put(
"normalize",
EMObject::INT,
"If set, returns normalized dot product -1.0 - 1.0.");
538 return "Residual power left in the image after optimally subtracting the reference with math.sub.optimal. Smaller values indicate a closer match.";
549 d.
put(
"minres",
EMObject::FLOAT,
"Lowest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=200");
550 d.
put(
"maxres",
EMObject::FLOAT,
"Highest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=10");
554 d.
put(
"mask",
EMObject::EMDATA,
"Real space mask. Only computes the residual power under the mask. Significant speed penalty if specified. Default=None.");
589 return "Real-space variance after density optimization, self should be noisy and target less noisy. Linear transform applied to density to minimize variance.";
600 d.
put(
"invert",
EMObject::INT,
"If set, 'with' is rescaled rather than 'this'. 'this' should still be the noisier image. (default=0)");
601 d.
put(
"keepzero",
EMObject::INT,
"If set, zero pixels will not be adjusted in the linear density optimization. (default=1)");
602 d.
put(
"matchfilt",
EMObject::INT,
"If set, with will be filtered so its radial power spectrum matches 'this' before density optimization of this. (default=1)");
603 d.
put(
"matchamp",
EMObject::INT,
"Takes per-pixel Fourier amplitudes from self and imposes them on the target, but leaves the phases alone. (default=0)");
604 d.
put(
"radweight",
EMObject::INT,
"Upweight variances closer to the edge of the image. (default=0)");
605 d.
put(
"debug",
EMObject::INT,
"Performs various debugging actions if set.");
648 return "Mean phase difference";
659 d.
put(
"snrweight",
EMObject::INT,
"If set, the SNR of 'this' will be used to weight the result. If 'this' lacks CTF info, it will check 'with'. (default=0)");
660 d.
put(
"snrfn",
EMObject::INT,
"If nonzero, an empirical function will be used as a radial weight rather than the true SNR. (1 - exp decay)'. (default=0)");
661 d.
put(
"ampweight",
EMObject::INT,
"If set, the amplitude of 'with' will be used as a weight in the averaging'. (default=0)");
662 d.
put(
"zeromask",
EMObject::INT,
"Treat regions in either image that are zero as a mask");
663 d.
put(
"minres",
EMObject::FLOAT,
"Lowest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=500");
664 d.
put(
"maxres",
EMObject::FLOAT,
"Highest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=10");
693 return "Computes the mean Fourier Ring Correlation between the image and reference (with optional weighting factors).";
704 d.
put(
"snrweight",
EMObject::INT,
"If set, the SNR of 'this' will be used to weight the result. If 'this' lacks CTF info, it will check 'with'. (default=0)");
705 d.
put(
"ampweight",
EMObject::INT,
"If set, the amplitude of 'this' will be used to weight the result (default=0)");
706 d.
put(
"sweight",
EMObject::INT,
"If set, weight the (1-D) average by the number of pixels in each ring (default=1)");
707 d.
put(
"nweight",
EMObject::INT,
"Downweight similarity based on number of particles in reference (default=0)");
708 d.
put(
"zeromask",
EMObject::INT,
"Treat regions in either image that are zero as a mask (default=0)");
709 d.
put(
"minres",
EMObject::FLOAT,
"Lowest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=500");
710 d.
put(
"maxres",
EMObject::FLOAT,
"Highest resolution to use in comparison (soft cutoff). Requires accurate A/pix in image. <0 disables. Default=10");
735 return "Align the 2d image vertically. Reference image is ignored";
Compute the cross-correlation coefficient between two images.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
string get_name() const
Get the Cmp's name.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Cmp class defines image comparison method.
virtual TypeDict get_param_types() const =0
Get Cmp parameter information in a dictionary.
virtual string get_desc() const =0
virtual float cmp(EMData *image, EMData *with) const =0
To compare 'image' with another image passed in through its parameters.
virtual string get_name() const =0
Get the Cmp's name.
virtual Dict get_params() const
Get the Cmp parameters in a key/value dictionary.
void validate_input_args(const EMData *image, const EMData *with) const
virtual void set_params(const Dict &new_params)
Set the Cmp parameters using a key/value dictionary.
Dict is a dictionary to store <string, EMObject> pair.
Use dot product of 2 same-size images to do the comparison.
string get_name() const
Get the Cmp's name.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
EMData stores an image's data and defines core image processing routines.
FRCCmp returns a quality factor based on FRC between images.
string get_name() const
Get the Cmp's name.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Factory is used to store objects to create new instances.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
string get_name() const
Get the Cmp's name.
Uses math.sub.optimal to remove the density of the reference from the image as much as possible.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
string get_name() const
Get the Cmp's name.
Variance between two data sets after various modifications.
string get_name() const
Get the Cmp's name.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Amplitude weighted mean phase difference (radians) with optional SNR weight.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
string get_name() const
Get the Cmp's name.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
This will calculate the dot product for each quadrant of the image and return the worst value.
string get_name() const
Get the Cmp's name.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
Squared Euclidean distance normalized by n between 'this' and 'with'.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
string get_name() const
Get the Cmp's name.
This implements the technique of Mike Schmid where by the cross correlation is normalized in an effor...
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
virtual string get_desc() const
virtual string get_name() const
Get the Cmp's name.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
This is a FSC comparitor for tomography.
virtual string get_desc() const
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
virtual string get_name() const
Get the Cmp's name.
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
Both images should be FFTs.
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
virtual string get_name() const
Get the Cmp's name.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
virtual string get_desc() const
Both images should be FFTs.
virtual string get_desc() const
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
virtual string get_name() const
Get the Cmp's name.
virtual float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
TypeDict is a dictionary to store <string, EMObject::ObjectType> pair.
void put(const string &key, EMObject::ObjectType o, const string &desc="")
float cmp(EMData *image, EMData *with) const
To compare 'image' with another image passed in through its parameters.
string get_name() const
Get the Cmp's name.
TypeDict get_param_types() const
Get Cmp parameter information in a dictionary.
map< string, vector< string > > dump_cmps_list()