def test_edf_stim_channel():
 raw = read_raw_edf(edf_stim_channel_path, preload=True, stim_channel=(-1))
 true_data = np.loadtxt(edf_txt_stim_channel_path).T
 (_, ns) = true_data.shape
 edf_data = raw._data[:, :ns]
 assert_array_equal(true_data[(-1)], edf_data[(-1)])
 assert_array_almost_equal((true_data[0:(-1)] * 1e-06), edf_data[0:(-1)])

def test_edf_stim_channel ( ) : raw = read_raw_edf ( edf_stim_channel_path , preload = True , stim_channel = ( - 1 ) ) true_data = np . loadtxt ( edf_txt_stim_channel_path ) . T ( _ , ns ) = true_data . shape edf_data = raw . _data [ : , : ns ] assert_array_equal ( true_data [ ( - 1 ) ] , edf_data [ ( - 1 ) ] ) assert_array_almost_equal ( ( true_data [ 0 : ( - 1 ) ] * 1e-06 ) , edf_data [ 0 : ( - 1 ) ] )
test stim channel for edf file .