lyman.signals.smoothing_matrix¶
-
lyman.signals.
smoothing_matrix
(measure, vertids, fwhm, exclude=None, minpool=6)[source]¶ Define a matrix to smooth voxels using surface geometry.
If T is an n_voxel x n_tp timeseries matrix, the resulting object S can be used to smooth the timeseries with the matrix operation S * T.
- Parameters
- measuresurface.SurfaceMeasure object
Object for measuring distance along a cortical mesh.
- vertids1d numpy array
Array of vertex IDs corresponding to each cortical voxel.
- fwhmpositive float or None
Size of the smoothing kernel, in mm, or None to return identity matrix.
- exclude1d numpy array
Binary array defining voxels that should be excluded and interpolated during smoothing.
- minpoolint
Minimum number of neighborhood vertices to include in smoothing pool.
- Returns
- Scsr sparse matrix
Matrix with smoothing weights.