@verbose
def _read_source_spaces_from_tree(fid, tree, patch_stats=False, verbose=None):
 spaces = dir_tree_find(tree, FIFF.FIFFB_MNE_SOURCE_SPACE)
 if (len(spaces) == 0):
  raise ValueError('No source spaces found')
 src = list()
 for s in spaces:
  logger.info('    Reading a source space...')
  this = _read_one_source_space(fid, s)
  logger.info('    [done]')
  if patch_stats:
   _complete_source_space_info(this)
  src.append(this)
 logger.info(('    %d source spaces read' % len(spaces)))
 return SourceSpaces(src)

@ verbose def _read_source_spaces_from_tree ( fid , tree , patch_stats = False , verbose = None ) : spaces = dir_tree_find ( tree , FIFF . FIFFB_MNE_SOURCE_SPACE ) if ( len ( spaces ) == 0 ) : raise ValueError ( 'No source spaces found' ) src = list ( ) for s in spaces : logger . info ( '    Reading a source space...' ) this = _read_one_source_space ( fid , s ) logger . info ( '    [done]' ) if patch_stats : _complete_source_space_info ( this ) src . append ( this ) logger . info ( ( '    %d source spaces read' % len ( spaces ) ) ) return SourceSpaces ( src )
read the source spaces from a fif file .