Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

3.10.2. nistats.thresholding.map_threshold

nistats.thresholding.map_threshold(stat_img=None, mask_img=None, alpha=0.001, threshold=3.0, height_control='fpr', cluster_threshold=0, two_sided=True)

Compute the required threshold level and return the thresholded map

Parameters
stat_imgNiimg-like object or None, optional

statistical image (presumably in z scale) whenever height_control is ‘fpr’ or None, stat_img=None is acceptable. If it is ‘fdr’ or ‘bonferroni’, an error is raised if stat_img is None.

mask_imgNiimg-like object, optional,

mask image

alpha: float or list, optional

number controlling the thresholding (either a p-value or q-value). Its actual meaning depends on the height_control parameter. This function translates alpha to a z-scale threshold.

threshold: float, optional

desired threshold in z-scale. This is used only if height_control is None

height_control: string, or None optional

false positive control meaning of cluster forming threshold: None|’fpr’|’fdr’|’bonferroni’

cluster_threshold: float, optional

cluster size threshold. In the returned thresholded map, sets of connected voxels (clusters) with size smaller than this number will be removed.

two_sided: Bool, optional,

Whether the thresholding should yield both positive and negative part of the maps. In that case, alpha is corrected by a factor of 2. Defaults to True.

Returns
thresholded_mapNifti1Image,

the stat_map thresholded at the prescribed voxel- and cluster-level

threshold: float,

the voxel-level threshold used actually