brainstat.mesh.data.mesh_smooth¶
-
brainstat.mesh.data.
mesh_smooth
(Y, surf, FWHM)[source]¶ Smooths surface data by repeatedly averaging over edges.
- Parameters
Y (numpy.ndarray) – Surface data of shape (n,v) or (n,v,k). v is the number of vertices, n is the number of observations, k is the number of variates.
surf (dict, BSPolyData) – A dictionary with key ‘tri’ or ‘lat’, or a BSPolyData object of the surface. surf[‘tri’] is a numpy.ndarray of shape (t,3), t is the triangle indices, or surf[‘lat’] is a numpy.ndarray of shape (nx,ny,nz), where (nx,ny,nz) is the volume size, values are 1=in, 0=out.
FWHM (float) – Gaussian smoothing filter in mesh units.
- Returns
numpy.ndarray – Smoothed surface data of shape (n,v) or (n,v,k).