mvpa2.misc.plot.flat_surf.flat_surface2grid_mask

mvpa2.misc.plot.flat_surf.flat_surface2grid_mask(surface, min_nsteps)

Computes a mask and corresponding coordinates from a flat surface

Parameters:

surface: Surface :

flat surface

min_nsteps: int :

minimum number of pixels in x and y direction

Returns:

x: np.ndarray :

x coordinates of surface

y: np.ndarray :

y coordinates of surface

m: np.ndarray :

mask array of size PxQ, with min(P,Q)==min_nsteps. m[i,j]==True iff the position at (i,j) is ‘inside’ the flat surface

xi: np.ndarray :

vector of length Q with interpolated x coordinates

yi: np.ndarray :

vector of length P with interpolated y coordinates

Notes

The output of this function can be used with scipy.interpolate.griddata