@testing.requires_testing_data
def test_lcmv_raw():
 (raw, _, _, _, noise_cov, label, forward, _, _, _) = _get_data(all_forward=False, epochs=False, data_cov=False)
 (tmin, tmax) = (0, 20)
 (start, stop) = raw.time_as_index([tmin, tmax])
 data_cov = mne.compute_raw_covariance(raw, tmin=tmin, tmax=tmax)
 stc = lcmv_raw(raw, forward, noise_cov, data_cov, reg=0.01, label=label, start=start, stop=stop)
 assert_array_almost_equal(np.array([tmin, tmax]), np.array([stc.times[0], stc.times[(-1)]]), decimal=2)
 vertno = [forward['src'][0]['vertno'], forward['src'][1]['vertno']]
 assert_true((len(stc.vertices[0]) == len(np.intersect1d(vertno[0], label.vertices))))
 assert_true((len(stc.vertices[1]) == 0))

@ testing . requires_testing_data def test_lcmv_raw ( ) : ( raw , _ , _ , _ , noise_cov , label , forward , _ , _ , _ ) = _get_data ( all_forward = False , epochs = False , data_cov = False ) ( tmin , tmax ) = ( 0 , 20 ) ( start , stop ) = raw . time_as_index ( [ tmin , tmax ] ) data_cov = mne . compute_raw_covariance ( raw , tmin = tmin , tmax = tmax ) stc = lcmv_raw ( raw , forward , noise_cov , data_cov , reg = 0.01 , label = label , start = start , stop = stop ) assert_array_almost_equal ( np . array ( [ tmin , tmax ] ) , np . array ( [ stc . times [ 0 ] , stc . times [ ( - 1 ) ] ] ) , decimal = 2 ) vertno = [ forward [ 'src' ] [ 0 ] [ 'vertno' ] , forward [ 'src' ] [ 1 ] [ 'vertno' ] ] assert_true ( ( len ( stc . vertices [ 0 ] ) == len ( np . intersect1d ( vertno [ 0 ] , label . vertices ) ) ) ) assert_true ( ( len ( stc . vertices [ 1 ] ) == 0 ) )
test lcmv with raw data .