@@ -122,6 +122,7 @@ def _read_mff_header(filepath):
122
122
# Add the sensor info.
123
123
sensor_layout_file = op .join (filepath , "sensorLayout.xml" )
124
124
sensor_layout_obj = parse (sensor_layout_file )
125
+
125
126
summaryinfo ["device" ] = sensor_layout_obj .getElementsByTagName ("name" )[
126
127
0
127
128
].firstChild .data
@@ -279,7 +280,7 @@ def _read_locs(filepath, egi_info, channel_naming):
279
280
280
281
fname = op .join (filepath , "coordinates.xml" )
281
282
if not op .exists (fname ):
282
- logger . warn ("File coordinates.xml not found, not setting channel locations" )
283
+ warn ("File coordinates.xml not found, not setting channel locations" )
283
284
ch_names = [channel_naming % (i + 1 ) for i in range (egi_info ["n_channels" ])]
284
285
return ch_names , None
285
286
dig_ident_map = {
@@ -487,14 +488,13 @@ def __init__(
487
488
488
489
if mon is not None :
489
490
info .set_montage (mon , on_missing = "ignore" )
490
-
491
- ref_idx = np .flatnonzero (np .isin (mon .ch_names , REFERENCE_NAMES ))
492
- if len (ref_idx ):
493
- ref_idx = ref_idx .item ()
494
- ref_coords = info ["chs" ][int (ref_idx )]["loc" ][:3 ]
495
- for chan in info ["chs" ]:
496
- if chan ["kind" ] == FIFF .FIFFV_EEG_CH :
497
- chan ["loc" ][3 :6 ] = ref_coords
491
+ ref_idx = np .flatnonzero (np .isin (mon .ch_names , REFERENCE_NAMES ))
492
+ if len (ref_idx ):
493
+ ref_idx = ref_idx .item ()
494
+ ref_coords = info ["chs" ][int (ref_idx )]["loc" ][:3 ]
495
+ for chan in info ["chs" ]:
496
+ if chan ["kind" ] == FIFF .FIFFV_EEG_CH :
497
+ chan ["loc" ][3 :6 ] = ref_coords
498
498
499
499
file_bin = op .join (input_fname , egi_info ["eeg_fname" ])
500
500
egi_info ["egi_events" ] = egi_events
0 commit comments