lyman.signals.identify_noisy_voxels

lyman.signals.identify_noisy_voxels(ts_img, mask_img, neighborhood=5, threshold=1.5, detrend=True)[source]

Create a mask of voxels that are unusually noisy given neighbors.

Parameters
ts_imgnibabel image

4D timeseries data.

mask_imgnibabel image

3D binary mask of relevant voxels

neighborhoodfloat

FWHM (in mm) to define local neighborhood for voxels.

thresholdfloat

Voxels with a relative coefficient of variation above this level will be defined as noisy

detrendbool

If True, linearly detrend the data before computing coefficient of variation.

Returns
noise_imgnibabel image

3D binary image with 1s in the position of locally noisy voxels.