mvpa2.misc.plot.flat_surf.flat_surface2xy(surface, max_deformation)

Returns a tuple with x and y coordinates of a flat surface


surface: Surface

flat surface

max_deformation: float

maximum deformation to make a non-flat surface flat. The normals of each face must have a dot product with the average face normal that is not less than (1-max_deformation); otherwise an exception is raised. The rationale for this option is that certain surfaces may be almost flat, and those can be made flat without problem; but surfaces that are not flat, such as inflated surfaces, should not be flattable.


x: np.ndarray

x coordinates

y: np.ndarray

y coordinates


If the surface is not flat (any z coordinate is non-zero), an exception is raised.