def _find_topomap_coords(info, picks, layout=None):
 if (len(picks) == 0):
  raise ValueError('Need more than 0 channels.')
 if (layout is not None):
  chs = [info['chs'][i] for i in picks]
  pos = [layout.pos[layout.names.index(ch['ch_name'])] for ch in chs]
  pos = np.asarray(pos)
 else:
  pos = _auto_topomap_coords(info, picks)
 return pos

def _find_topomap_coords ( info , picks , layout = None ) : if ( len ( picks ) == 0 ) : raise ValueError ( 'Need more than 0 channels.' ) if ( layout is not None ) : chs = [ info [ 'chs' ] [ i ] for i in picks ] pos = [ layout . pos [ layout . names . index ( ch [ 'ch_name' ] ) ] for ch in chs ] pos = np . asarray ( pos ) else : pos = _auto_topomap_coords ( info , picks ) return pos
guess the e/meg layout and return appropriate topomap coordinates .