@@ -122,6 +122,7 @@ def _read_mff_header(filepath):
122122 # Add the sensor info.
123123 sensor_layout_file = op .join (filepath , "sensorLayout.xml" )
124124 sensor_layout_obj = parse (sensor_layout_file )
125+
125126 summaryinfo ["device" ] = sensor_layout_obj .getElementsByTagName ("name" )[
126127 0
127128 ].firstChild .data
@@ -279,7 +280,7 @@ def _read_locs(filepath, egi_info, channel_naming):
279280
280281 fname = op .join (filepath , "coordinates.xml" )
281282 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" )
283284 ch_names = [channel_naming % (i + 1 ) for i in range (egi_info ["n_channels" ])]
284285 return ch_names , None
285286 dig_ident_map = {
@@ -487,14 +488,13 @@ def __init__(
487488
488489 if mon is not None :
489490 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
498498
499499 file_bin = op .join (input_fname , egi_info ["eeg_fname" ])
500500 egi_info ["egi_events" ] = egi_events
0 commit comments