def surface(self, name='<STR_LIT>'):
if pimms.is_str(name):<EOL><INDENT>if name.lower() == '<STR_LIT>' and '<STR_LIT>' not in self.surfaces:<EOL><INDENT>return self.midgray_surface <EOL><DEDENT>return self.surfaces[name]<EOL><DEDENT>elif pimms.is_vector(name, '<STR_LIT>') and len(name) == <NUM_LIT:1>:<EOL><INDENT>x0 = self.white_surface.coordinates<EOL>dx = self.white_to_pial_vectors<EOL>return self.make_mesh(x0 + name[<NUM_LIT:0>]*dx)<EOL><DEDENT>elif pimms.is_real(name):<EOL><INDENT>x0 = self.white_surface.coordinates<EOL>x1 = self.pial_surface.coordinates<EOL>return self.make_mesh((<NUM_LIT:1> - name)*x0 + name*x1)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>' % name)<EOL><DEDENT>
cortex.surface() yields the white surface of the given cortex
cortex.surface(name) yields the surface with the given name (e.g., 'white', 'pial',
  'inflated', 'midgray').
cortex.surface(fraction) yields the surface that is <fraction> of the distance from white
  to pial (0 is equivalent to 'white'; 1 is equivalent to 'pial'). Layers outside of the
  range 0-1 may be returned by following the vectors between white and pial surfaces, but
  they may have odd appearances, and this should not be confused with surface inflation.
cortex.surface([dist]) yields the layer that is the given distance from the white surface.