brainstat.mesh.utils.mesh_average

brainstat.mesh.utils.mesh_average(filenames, fun=<ufunc 'add'>, output_surfstat=False)[source]

Average, minimum, or maximum of surfaces.

Args:

filenames (2D numpy array): Numpy array of filenames of surfaces or BSPolyData objects.

fun : function handle to apply to two surfaces, e.g. np.add (default) will give the average of the surfaces, np.fmin or np.fmax will give the min or max, respectively.

output_surfstat (boolean): If True, outputs the surface in SurfStat format. If false

outputs the surface as BSPolyData. Default is False.

Returns:

surface [BSPolyData, dict]: The output surface.