def _check_stc(stc, evoked, idx, ratio=50.0):
 assert_array_almost_equal(stc.times, evoked.times, 5)
 amps = np.sum((stc.data ** 2), axis=1)
 order = np.argsort(amps)[::(-1)]
 amps = amps[order]
 verts = np.concatenate(stc.vertices)[order]
 assert_equal(idx, verts[0], err_msg=str(list(verts)))
 assert_true((amps[0] > (ratio * amps[1])), msg=str((amps[0] / amps[1])))

def _check_stc ( stc , evoked , idx , ratio = 50.0 ) : assert_array_almost_equal ( stc . times , evoked . times , 5 ) amps = np . sum ( ( stc . data ** 2 ) , axis = 1 ) order = np . argsort ( amps ) [ : : ( - 1 ) ] amps = amps [ order ] verts = np . concatenate ( stc . vertices ) [ order ] assert_equal ( idx , verts [ 0 ] , err_msg = str ( list ( verts ) ) ) assert_true ( ( amps [ 0 ] > ( ratio * amps [ 1 ] ) ) , msg = str ( ( amps [ 0 ] / amps [ 1 ] ) ) )
check that stcs are compatible .