def _stc_gen(data, sfreq, tmin, combo=False):
 vertices = [np.arange(data.shape[1]), np.empty(0)]
 for d in data:
  if (not combo):
   stc = SourceEstimate(data=d, vertices=vertices, tmin=tmin, tstep=(1 / float(sfreq)))
   (yield stc)
  else:
   arr = d[0]
   stc = SourceEstimate(data=d[1:], vertices=vertices, tmin=tmin, tstep=(1 / float(sfreq)))
   (yield (arr, stc))

def _stc_gen ( data , sfreq , tmin , combo = False ) : vertices = [ np . arange ( data . shape [ 1 ] ) , np . empty ( 0 ) ] for d in data : if ( not combo ) : stc = SourceEstimate ( data = d , vertices = vertices , tmin = tmin , tstep = ( 1 / float ( sfreq ) ) ) ( yield stc ) else : arr = d [ 0 ] stc = SourceEstimate ( data = d [ 1 : ] , vertices = vertices , tmin = tmin , tstep = ( 1 / float ( sfreq ) ) ) ( yield ( arr , stc ) )
simulate a sourceestimate generator .