def test_maxfilter_io():
 info = read_info(raw_fname)
 mf = info['proc_history'][1]['max_info']
 assert_true(mf['sss_info']['frame'], FIFF.FIFFV_COORD_HEAD)
 assert_true((5 <= mf['sss_info']['in_order'] <= 11))
 assert_true((mf['sss_info']['out_order'] <= 5))
 assert_true((mf['sss_info']['nchan'] > len(mf['sss_info']['components'])))
 assert_equal(info['ch_names'][:mf['sss_info']['nchan']], mf['sss_ctc']['proj_items_chs'])
 assert_equal(mf['sss_ctc']['decoupler'].shape, (mf['sss_info']['nchan'], mf['sss_info']['nchan']))
 assert_equal(np.unique(np.diag(mf['sss_ctc']['decoupler'].toarray())), np.array([1.0], dtype=np.float32))
 assert_equal(mf['sss_cal']['cal_corrs'].shape, (306, 14))
 assert_equal(mf['sss_cal']['cal_chans'].shape, (306, 2))
 vv_coils = [v for (k, v) in FIFF.items() if ('FIFFV_COIL_VV' in k)]
 assert_true(all(((k in vv_coils) for k in set(mf['sss_cal']['cal_chans'][:, 1]))))

def test_maxfilter_io ( ) : info = read_info ( raw_fname ) mf = info [ 'proc_history' ] [ 1 ] [ 'max_info' ] assert_true ( mf [ 'sss_info' ] [ 'frame' ] , FIFF . FIFFV_COORD_HEAD ) assert_true ( ( 5 <= mf [ 'sss_info' ] [ 'in_order' ] <= 11 ) ) assert_true ( ( mf [ 'sss_info' ] [ 'out_order' ] <= 5 ) ) assert_true ( ( mf [ 'sss_info' ] [ 'nchan' ] > len ( mf [ 'sss_info' ] [ 'components' ] ) ) ) assert_equal ( info [ 'ch_names' ] [ : mf [ 'sss_info' ] [ 'nchan' ] ] , mf [ 'sss_ctc' ] [ 'proj_items_chs' ] ) assert_equal ( mf [ 'sss_ctc' ] [ 'decoupler' ] . shape , ( mf [ 'sss_info' ] [ 'nchan' ] , mf [ 'sss_info' ] [ 'nchan' ] ) ) assert_equal ( np . unique ( np . diag ( mf [ 'sss_ctc' ] [ 'decoupler' ] . toarray ( ) ) ) , np . array ( [ 1.0 ] , dtype = np . float32 ) ) assert_equal ( mf [ 'sss_cal' ] [ 'cal_corrs' ] . shape , ( 306 , 14 ) ) assert_equal ( mf [ 'sss_cal' ] [ 'cal_chans' ] . shape , ( 306 , 2 ) ) vv_coils = [ v for ( k , v ) in FIFF . items ( ) if ( 'FIFFV_COIL_VV' in k ) ] assert_true ( all ( ( ( k in vv_coils ) for k in set ( mf [ 'sss_cal' ] [ 'cal_chans' ] [ : , 1 ] ) ) ) )
test maxfilter io .