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 array of shape (n,v) or (n,v,k)) – surface data, v=#vertices, n=#observations, k=#variates.

  • surf (a dictionary with key 'tri' or 'lat', or a BSPolyData object.) – surf[‘tri’] = numpy array of shape (t,3), triangle indices, or surf[‘lat’] = numpy array of shape (nx,ny,nz), 1=in, 0=out, (nx,ny,nz) = size(volume).

  • FWHM (approximate FWHM of Gaussian smoothing filter, in mesh units.) –

Returns

Y (numpy array of shape (n,v) or (n,v,k),) – smoothed data.