nlsam.smoothing

Module Contents

Functions

sh_smooth(data, bvals, bvecs, sh_order=4, similarity_threshold=50, regul=0.006)

Smooth the raw diffusion signal with spherical harmonics.

_local_standard_deviation(arr)

Standard deviation estimation from local patches.

local_standard_deviation(arr, n_cores=-1, verbose=False)

Standard deviation estimation from local patches.

Attributes

logger

nlsam.smoothing.logger
nlsam.smoothing.sh_smooth(data, bvals, bvecs, sh_order=4, similarity_threshold=50, regul=0.006)

Smooth the raw diffusion signal with spherical harmonics. data : ndarray

The diffusion data to smooth.

gtabgradient table object

Corresponding gradients table object to data.

sh_orderint, default 8

Order of the spherical harmonics to fit.

similarity_thresholdint, default 50

All b-values such that |b_1 - b_2| < similarity_threshold will be considered as identical for smoothing purpose. Must be lower than 200.

regulfloat, default 0.006

Amount of regularization to apply to sh coefficients computation.

pred_signdarray

The smoothed diffusion data, fitted through spherical harmonics.

nlsam.smoothing._local_standard_deviation(arr)

Standard deviation estimation from local patches.

Estimates the local variance on patches by using convolutions to estimate the mean. This is the multiprocessed function.

arr3D or 4D ndarray

The array to be estimated

sigmandarray

Map of standard deviation of the noise.

nlsam.smoothing.local_standard_deviation(arr, n_cores=- 1, verbose=False)

Standard deviation estimation from local patches.

The noise field is estimated by subtracting the data from it’s low pass filtered version, from which we then compute the variance on a local neighborhood basis.

arr3D or 4D ndarray

The array to be estimated

n_coresint

Number of cores to use for multiprocessing, default : all of them

verbose: int

If True, prints progress information. A higher number prints more often

sigmandarray

Map of standard deviation of the noise.