IMP logo

IMP::em::CoarseCC Class Reference


Detailed Description

Responsible for performing coarse fitting between two density objects.

The pixels involved are derived from the positions of N particles.

Inheritance diagram for IMP::em::CoarseCC:

Inheritance graph
[legend]

Static Public Member Functions

static void calc_derivatives (const DensityMap &em_map, SampledDensityMap &model_map, const float &scalefac, std::vector< float > &dvx, std::vector< float > &dvy, std::vector< float > &dvz)
static float cross_correlation_coefficient (const DensityMap &em_map, DensityMap &model_map, float voxel_data_threshold, bool recalc_ccnormfac=true, bool divide_by_rms=true)
 Calculates the cross correlation coefficient between two maps.

Related Functions

(Note that these are not member functions.)

static float evaluate (DensityMap &data, SampledDensityMap &model_map, std::vector< float > &dvx, std::vector< float > &dvy, std::vector< float > &dvz, float scalefactor, bool lderiv, bool divide_by_rms=true, bool resample=true)
 Evaluates the value of the EM fitting term.

Member Function Documentation

static void IMP::em::CoarseCC::calc_derivatives ( const DensityMap em_map,
SampledDensityMap model_map,
const float &  scalefac,
std::vector< float > &  dvx,
std::vector< float > &  dvy,
std::vector< float > &  dvz 
) [static]

Computes the derivatives of the cross correlation term scalefac*(1-ccc) at each voxel of the map.

Parameters:
[in] em_map the target density map.
[in] model_map the sampled density map of the model
[in] scalefac scale factor to apply to the value of the cross correlation term
[out] dvx vector to contain the x partial derivatives
[out] dvy vector to contain the y partial derivatives
[out] dvz vector to contain the z partial derivatives
Note:
: The function assumes that correct RMS are calculated for the densities

static float IMP::em::CoarseCC::cross_correlation_coefficient ( const DensityMap em_map,
DensityMap model_map,
float  voxel_data_threshold,
bool  recalc_ccnormfac = true,
bool  divide_by_rms = true 
) [static]

Calculates the cross correlation coefficient between two maps.

Cross correlation coefficient between the em density and the density of a model. The function applied is: $\frac{\sum_{i=1}^{N}{{td}_i}{{md}_i}-{N} {{mean}_{td}} {{mean}_{md}}} {N\sigma_{{td}}\sigma_{{md}}}$, such that $N$ is the number of voxels, ${td}$ is the target density, ${tm}$ is the model density,

Parameters:
[in] em_map the target map (experimentally determined)
[in] model_map the sampled density map of the model
[in] voxel_data_threshold voxels with value lower than threshold in model_map are not summed (avoid calculating correlation on voxels below the threshold)
[in] recalc_ccnormfac determines wheather the model_map should be normalized prior to the correlation calculation. false is faster, but potentially innacurate
[in] divide_by_rms determines wheather the model_map should be normalized prior to the correlation calculation. false is faster, but potentially innacurate
Returns:
the cross correlation coefficient value between two density maps
Note:
This is not the local CC function


Friends And Related Function Documentation

static float evaluate ( DensityMap data,
SampledDensityMap model_map,
std::vector< float > &  dvx,
std::vector< float > &  dvy,
std::vector< float > &  dvz,
float  scalefactor,
bool  lderiv,
bool  divide_by_rms = true,
bool  resample = true 
) [related]

Evaluates the value of the EM fitting term.

Note:
The function returns scalefac*(1-ccc) to support minimization optimization. The ccc value (cross correlation coefficient) is calculate by the cross_correlation_coefficient function.
Parameters:
[in] data DensityMap class containing the EM map. note: correct RMSD and mean MUST be in the header!
[in] model_map SampledDensityMap class prepared to contain the simulated EM map for the model.
[in] dvx vector to contain the xpartial derivatives
[in] dvy vector to contain the y partial derivatives
[in] dvz vector to contain the z partial derivatives
[in] scalefactor scale factor to apply to the value of the cross correlation term
[in] lderiv if true, the derivatives of the term are computed
[in] divide_by_rms determines wheather the model_map should be normalized prior to the correlation calculation. false is faster, but potentially innacurate
[in] resample if true, the model density map is resampled
Returns:
the value of the cross correlation term: scalefac*(1-ccc)


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

Generated on Mon Mar 8 23:09:01 2010 for IMP by doxygen 1.5.8