def test_helmet():
 base_dir = op.join(op.dirname(__file__), '..', 'io')
 fname_raw = op.join(base_dir, 'tests', 'data', 'test_raw.fif')
 fname_kit_raw = op.join(base_dir, 'kit', 'tests', 'data', 'test_bin_raw.fif')
 fname_bti_raw = op.join(base_dir, 'bti', 'tests', 'data', 'exported4D_linux_raw.fif')
 fname_ctf_raw = op.join(base_dir, 'tests', 'data', 'test_ctf_raw.fif')
 fname_trans = op.join(base_dir, 'tests', 'data', 'sample-audvis-raw-trans.txt')
 trans = _get_trans(fname_trans)[0]
 for fname in [fname_raw, fname_kit_raw, fname_bti_raw, fname_ctf_raw]:
  helmet = get_meg_helmet_surf(read_info(fname), trans)
  assert_equal(len(helmet['rr']), 304)
  assert_equal(len(helmet['rr']), len(helmet['nn']))

def test_helmet ( ) : base_dir = op . join ( op . dirname ( __file__ ) , '..' , 'io' ) fname_raw = op . join ( base_dir , 'tests' , 'data' , 'test_raw.fif' ) fname_kit_raw = op . join ( base_dir , 'kit' , 'tests' , 'data' , 'test_bin_raw.fif' ) fname_bti_raw = op . join ( base_dir , 'bti' , 'tests' , 'data' , 'exported4D_linux_raw.fif' ) fname_ctf_raw = op . join ( base_dir , 'tests' , 'data' , 'test_ctf_raw.fif' ) fname_trans = op . join ( base_dir , 'tests' , 'data' , 'sample-audvis-raw-trans.txt' ) trans = _get_trans ( fname_trans ) [ 0 ] for fname in [ fname_raw , fname_kit_raw , fname_bti_raw , fname_ctf_raw ] : helmet = get_meg_helmet_surf ( read_info ( fname ) , trans ) assert_equal ( len ( helmet [ 'rr' ] ) , 304 ) assert_equal ( len ( helmet [ 'rr' ] ) , len ( helmet [ 'nn' ] ) )
test loading helmet surfaces .