- MNE version: 1.7.1
- operating system: e.g. macOS 15.4
I am a programmer with zero knowledge of EEG helping a PI create a pipeline to analyze his data.I have an EEG file (.mff) that comes from Netstation. I managed to load the data using mne.io.read_raw_egi and then looked at some of the data to do a sanity check. For some reason the number of time points coming from the data import is different than what netsation says there are. My script tells me there are 629588 and netsation says there are 547012. Anyone has experience with this? Am I missing an exclusion criteria of some sort? My end goal is to end up with epoch files that will be used for analysis. Thank you.
# Define the paths to the data files
data_path = "/Users/keeglab/Desktop/EEG_data/raw_data/"
t1_file_list = ["hyperscan_ACM_101_t1_20220531_103952_seg.mff"]
td_file_list = ["hyperscan_ACM_101_t1_td_20210903_014317_seg.mff"]
# Read the customized montage
custom_montage= mne.channels.read_custom_montage(data_path + 'GSN129.sfp')
custom_montage.ch_names[-1] = 'E128'
print(f"Montage channel names are:\n {custom_montage.ch_names}\n")
# Define the channel exclusion list
drop_channel_list = ["VREF", "DIN2", "DIN1"]
for t1_file,td_file in zip(t1_file_list,td_file_list):
# Get the path to the data file
input_fname_t1 = data_path + t1_file
input_fname_td = data_path + td_file
# Load the data files
raw_data_t1 = mne.io.read_raw_egi(input_fname_t1)
raw_data_td = mne.io.read_raw_egi(input_fname_td)
# Drop channels and add the montage
raw_data_t1.drop_channels(drop_channel_list)
raw_data_t1.set_montage(custom_montage)
raw_data_td.drop_channels(drop_channel_list)
raw_data_td.set_montage(custom_montage)
print(raw_data_td.info)
print(f"Reduced channel list:\n {raw_data_td.ch_names}\n")
print(f"Number of time points:\n {raw_data_td.n_times}\n")