#NEWLINE# def test_surfpatch( ) : #NEWLINE# #INDENT# from cortex import db #NEWLINE# ( wm , polys ) = db . get_surf ( 'S1' , 'wm' , 'lh' ) #NEWLINE# ( pia , _ ) = db . get_surf ( 'S1' , 'pia' , 'lh' ) #NEWLINE# surf = polyutils . Surface ( subpolys , polys ) #NEWLINE# ( subwm , subpia , subpolys ) = surf . extract_chunk ( auxpts = pia ) #NEWLINE# subsurf = polyutils . Surface ( subwm , subpolys ) #NEWLINE# return [ patch for patch in subsurf . patches ( n = 0.5 ) ]