@testing.requires_testing_data
def test_maxwell_filter_additional():
 data_path = op.join(testing.data_path(download=False))
 file_name = 'test_move_anon'
 raw_fname = op.join(data_path, 'SSS', (file_name + '_raw.fif'))
 raw = read_crop(raw_fname, (0.0, 2.0))
 raw.load_data()
 raw.pick_types(meg=True, eeg=False)
 int_order = 8
 raw_sss = maxwell_filter(raw, origin=mf_head_origin, regularize=None, bad_condition='ignore')
 tempdir = _TempDir()
 test_outname = op.join(tempdir, 'test_raw_sss.fif')
 raw_sss.save(test_outname)
 raw_sss_loaded = read_crop(test_outname).load_data()
 assert_allclose(raw_sss_loaded[:][0], raw_sss[:][0], rtol=1e-06, atol=1e-20)
 cov_raw = compute_raw_covariance(raw)
 cov_sss = compute_raw_covariance(raw_sss)
 scalings = None
 cov_raw_rank = _estimate_rank_meeg_cov(cov_raw['data'], raw.info, scalings)
 cov_sss_rank = _estimate_rank_meeg_cov(cov_sss['data'], raw_sss.info, scalings)
 assert_equal(cov_raw_rank, raw.info['nchan'])
 assert_equal(cov_sss_rank, _get_n_moments(int_order))

@ testing . requires_testing_data def test_maxwell_filter_additional ( ) : data_path = op . join ( testing . data_path ( download = False ) ) file_name = 'test_move_anon' raw_fname = op . join ( data_path , 'SSS' , ( file_name + '_raw.fif' ) ) raw = read_crop ( raw_fname , ( 0.0 , 2.0 ) ) raw . load_data ( ) raw . pick_types ( meg = True , eeg = False ) int_order = 8 raw_sss = maxwell_filter ( raw , origin = mf_head_origin , regularize = None , bad_condition = 'ignore' ) tempdir = _TempDir ( ) test_outname = op . join ( tempdir , 'test_raw_sss.fif' ) raw_sss . save ( test_outname ) raw_sss_loaded = read_crop ( test_outname ) . load_data ( ) assert_allclose ( raw_sss_loaded [ : ] [ 0 ] , raw_sss [ : ] [ 0 ] , rtol = 1e-06 , atol = 1e-20 ) cov_raw = compute_raw_covariance ( raw ) cov_sss = compute_raw_covariance ( raw_sss ) scalings = None cov_raw_rank = _estimate_rank_meeg_cov ( cov_raw [ 'data' ] , raw . info , scalings ) cov_sss_rank = _estimate_rank_meeg_cov ( cov_sss [ 'data' ] , raw_sss . info , scalings ) assert_equal ( cov_raw_rank , raw . info [ 'nchan' ] ) assert_equal ( cov_sss_rank , _get_n_moments ( int_order ) )
test processing of maxwell filtered data .