tedana.utils
.make_adaptive_mask
- make_adaptive_mask(data, mask=None, getsum=False, threshold=1)[source]
Make map of data specifying longest echo a voxel can be sampled with.
- Parameters:
data ((S x E x T) array_like) – Multi-echo data array, where S is samples, E is echos, and T is time
mask (
str
or img_like, optional) – Binary mask for voxels to consider in TE Dependent ANAlysis. Default is to generate mask from data with good signal across echoesgetsum (
bool
, optional) – Return masksum in addition to mask. Default: Falsethreshold (
int
, optional) – Minimum echo count to retain in the mask. Default is 1, which is equivalent not thresholding.
- Returns:
mask ((S,)
numpy.ndarray
) – Boolean array of voxels that have sufficient signal in at least one echomasksum ((S,)
numpy.ndarray
) – Valued array indicating the number of echos with sufficient signal in a given voxel. Only returned if getsum = True