@testing.requires_testing_data
def test_read_source_spaces():
 src = read_source_spaces(fname, patch_stats=True)
 lh_points = src[0]['rr']
 lh_faces = src[0]['tris']
 lh_use_faces = src[0]['use_tris']
 rh_points = src[1]['rr']
 rh_faces = src[1]['tris']
 rh_use_faces = src[1]['use_tris']
 assert_true((lh_faces.min() == 0))
 assert_true((lh_faces.max() == (lh_points.shape[0] - 1)))
 assert_true((lh_use_faces.min() >= 0))
 assert_true((lh_use_faces.max() <= (lh_points.shape[0] - 1)))
 assert_true((rh_faces.min() == 0))
 assert_true((rh_faces.max() == (rh_points.shape[0] - 1)))
 assert_true((rh_use_faces.min() >= 0))
 assert_true((rh_use_faces.max() <= (rh_points.shape[0] - 1)))

@ testing . requires_testing_data def test_read_source_spaces ( ) : src = read_source_spaces ( fname , patch_stats = True ) lh_points = src [ 0 ] [ 'rr' ] lh_faces = src [ 0 ] [ 'tris' ] lh_use_faces = src [ 0 ] [ 'use_tris' ] rh_points = src [ 1 ] [ 'rr' ] rh_faces = src [ 1 ] [ 'tris' ] rh_use_faces = src [ 1 ] [ 'use_tris' ] assert_true ( ( lh_faces . min ( ) == 0 ) ) assert_true ( ( lh_faces . max ( ) == ( lh_points . shape [ 0 ] - 1 ) ) ) assert_true ( ( lh_use_faces . min ( ) >= 0 ) ) assert_true ( ( lh_use_faces . max ( ) <= ( lh_points . shape [ 0 ] - 1 ) ) ) assert_true ( ( rh_faces . min ( ) == 0 ) ) assert_true ( ( rh_faces . max ( ) == ( rh_points . shape [ 0 ] - 1 ) ) ) assert_true ( ( rh_use_faces . min ( ) >= 0 ) ) assert_true ( ( rh_use_faces . max ( ) <= ( rh_points . shape [ 0 ] - 1 ) ) )
test reading of source space meshes .