flc_scoring#

flc_scoring(template, template_mask, ft_target, ft_target2, template_filter, fast_shape, fast_ft_shape, rotations, callback, interpolation_order)[source]#

Computes a normalized cross-correlation between target (f), template (g), and template_mask (m)

\[\frac{CC(f, \frac{g*m - \overline{g*m}}{\sigma_{g*m}})} {N_m * \sqrt{ \frac{CC(f^2, m)}{N_m} - (\frac{CC(f, m)}{N_m})^2} },\]

where

\[CC(f,g) = \mathcal{F}^{-1}(\mathcal{F}(f) \cdot \mathcal{F}(g)^*)\]

and Nm is the sum of g.

Parameters:
templateUnion[Tuple[type, tuple of ints, type], BackendArray]

Template data buffer, its shape and datatype.

template_maskUnion[Tuple[type, tuple of ints, type], BackendArray]

Template mask data buffer, its shape and datatype.

template_filterUnion[Tuple[type, tuple of ints, type], BackendArray]

Template filter data buffer, its shape and datatype.

ft_targetUnion[Tuple[type, tuple of ints, type], BackendArray]

Fourier transformed target data buffer, its shape and datatype.

ft_target2Union[Tuple[type, tuple of ints, type], BackendArray]

Fourier transformed squared target data buffer, its shape and datatype.

fast_shapetuple of ints

Data shape for the forward Fourier transform.

fast_ft_shapetuple of ints

Data shape for the inverse Fourier transform.

rotationsBackendArray

Rotation matrices to be sampled (n, d, d).

callbackCallbackClass

A callable for processing the result of each rotation.

callback_class_argsDict

Dictionary of arguments to be passed to callback.

interpolation_orderint

Spline order for template rotations.

Returns:
Optional[CallbackClass]

callback if provided otherwise None.

References

[1]

Hrabe T. et al, J. Struct. Biol. 178, 177 (2012).