tomodrgn.utils.calc_fsc#
- calc_fsc(vol1: ndarray | str, vol2: ndarray | str, mask: str | None = None, thresh: int = 99, dilate: int | None = None, dist: int | None = None) tuple[ndarray, ndarray] [source]#
Calculate the FSC between two volumes with optional masking.
- Parameters:
vol1 – path to volume1.mrc, boxsize D,D,D, or ndarray of vol1 voxels
vol2 – path to volume2.mrc, boxsize D,D,D, or ndarray of vol2 voxels
mask – mask to calculate from volumes, one of [None, ‘sphere’, ‘tight’, ‘soft’]
thresh – data percentile threshold at which to binarize mask when calculating ‘tight’ or initializing ‘soft’ masks
dilate – for soft mask, number of pixels to expand auto-determined tight mask
dist – for soft mask, number of pixels over which to apply soft edge
- Returns:
x: spatial resolution in units of (1/px). fsc: the Fourier Shell Correlation at each resolution shell specified by x.