OSCR

The Mismatch Negativity Compared: EEG, SQUID‐MEG, and Novel 4 Helium‐OPMs

Code ↔ Paper

12 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 12 matches
  1. [1] § Materials and Methods › Data Analysis ↔ Fig_S2-3a.py, lines 475–524 · score 0.58 · spatiotemporal cluster, cluster forming, permutation, threshold, window, sensors
  2. [2] § Materials and Methods › Data Analysis ↔ B2_SQUID_IndividualStats.py, lines 37–122 · score 0.58 · cluster permutation, cluster forming, matrix, threshold, odd, epochs
  3. [3] § Materials and Methods › Data Preprocessing ↔ A1_SQUID-SQUIDEEG_preproc.py, lines 309–318 · score 0.57 · eye movement artifacts, regress, EOG, Preprocessing, epoched, SQUID
  4. [4] § Materials and Methods › Data Preprocessing ↔ A3_OPM-EEG_preproc.py, lines 250–257 · score 0.57 · eye movement artifacts, regress, EOG, Preprocessing, epoched, OPM
  5. [5] § Materials and Methods › Data Analysis ↔ REV_EEG-SNR.py, lines 101–147 · score 0.55 · MLC51, MLF46, MRF41, MLC25, selection, LC11
  6. [6] § Materials and Methods › Data Analysis ↔ Fig4.py, lines 100–147 · score 0.54 · MLC51, MLF46, MRF41, MLC25, selection, LC11
  7. [7] § Materials and Methods › Data Preprocessing ↔ A1_SQUID-SQUIDEEG_preproc.py, lines 57–125 · score 0.52 · SDs, breaks, segments, spikes, omitted, amplitude
  8. [8] § Materials and Methods › Data Preprocessing ↔ A2_OPM_preproc.py, lines 69–108 · score 0.52 · SDs, breaks, segments, spikes, omitted, amplitude
  9. [9] § Materials and Methods › Data Preprocessing ↔ A2_OPM_preproc.py, lines 225–255 · score 0.51 · linear regression, rolling, channel, filtered, Preprocessing, OPM
  10. [10] § Results › Significant MMN for SQUID‐MEG, EEG, and OPM‐MEG ↔ B3_OPM_IndividualStats.py, lines 39–96 · score 0.51 · 118–196 ms, left cluster, 118 ms, OPM, SQUID
  11. [11] § Results › Significant MMN for SQUID‐MEG, EEG, and OPM‐MEG ↔ Fig2_OPM.py, lines 65–81 · score 0.50 · 118–196 ms, left cluster, 118 ms, OPM, SQUID
  12. [12] § Materials and Methods › Data Analysis ↔ REV_EEG-SNR.py, lines 101–147 · score 0.50 · selection bias, SNR, baseline, peak, sub, 250 ms

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 431 lines · 17 KB · no license · 2 matches

  1. #Preamble
  2. import os.path as op
  3. from os import listdir
  4. import mne
  5. import numpy as np
  6. import autoreject as ar
  7. import matplotlib.pyplot as plt
  8. plt.ion()
  9. #Task parameters
  10. tmin,tmax =-0.2, 0.41 #time before and after trigger. Tones are spaced 610ms apart
  11. bl_min,bl_max=-0.2,0 #baseline start and end (None for either first or last sample)
  12. highpass,lowpass = 2,45 #bandpass frequencies
  13. highpass_final,lowpass_final=2,20 #after preproc, but before epoching, apply more stingent filter
  14. line_freq=[50,100,150] #notch filter frequency(/ies)
  15. final_samp_rate=1000 #Output sampling rate
  16. use_previous_rejection=1 #load rejection parameters from previous dataset, for consistency when reanalysing with different parameters
  17. use_autoreject=1
  18. #define file name
  19. data_path = '/sps/cermep/opm/NEW_MEG/HV'
  20. #Get datasets
  21. dirs = [int(d) for d in listdir(data_path) if op.isdir(op.join(data_path, d)) and d.isnumeric()]
  22. dirs.sort()
  23. #Let user select subject
  24. print('Available Subjects: ')
  25. sub_list=[]
  26. for d in range(len(dirs)):
  27. ds_files=[d for d in listdir(op.join(data_path, str(dirs[d]).zfill(2))) if '.ds' in d and 'MEG' in d and 'MMN' in d]
  28. if len(ds_files)>0:
  29. print(str(dirs[d]).zfill(2))
  30. sub_list.append(str(dirs[d]).zfill(2))
  31. input_given=False
  32. while not input_given:
  33. inp = input('Select Subject: ') #Ask for user input
  34. if inp.isdecimal() and np.any(np.isin(dirs,int(inp))):
  35. print('Subject '+inp+' selected')
  36. subject=inp.zfill(2)
  37. input_given=True
  38. else:
  39. print('Incorrect input, please try again')
  40. print('Retreiving sessions..')
  41. print('Loading data')
  42. ds_files=[d for d in listdir(op.join(data_path, subject)) if '.ds' in d and 'MEG' in d and 'MMN' in d]
  43. ds_files.sort()
  44. ses_nr=[int(d[-5:-3]) for d in ds_files]
  45. ses_nr=np.sort(ses_nr)
  46. runs=[]
  47. for s in range(len(ses_nr)):
  48. runs.append(ds_files[0][:-5] +str(ses_nr[s]).zfill(2) +'.ds')
  49. #AUDIO triggers:
  50. # '1' - normal audio
  51. # '2' - oddball
  52. #rename for EEG
  53. rename = {
  54. 'EEG001-2800': 'Fp1',
  55. 'EEG002-2800': 'Fp2',
  56. 'EEG003-2800': 'AFz',
  57. 'EEG004-2800': 'F1',
  58. 'EEG005-2800': 'F2',
  59. 'EEG006-2800': 'FC5',
  60. 'EEG007-2800': 'FCz',
  61. 'EEG008-2800': 'FC6',
  62. 'EEG009-2800': 'C1',
  63. 'EEG010-2800': 'C2',
  64. 'EEG011-2800': 'TP9',
  65. 'EEG012-2800': 'TP10',
  66. 'EEG013-2800': 'P7',
  67. 'EEG014-2800': 'P8',
  68. }
  69. st_1020=mne.channels.make_standard_montage('standard_1020')
  70. all_raw=[]
  71. for i_run in runs:
  72. print('Loading ' +i_run)
  73. file_name=op.join(data_path, subject, i_run)
  74. raw = mne.io.read_raw_ctf(file_name, preload=True)
  75. raw.rename_channels(rename)
  76. raw.set_montage(st_1020, match_alias=rename,on_missing='ignore')
  77. if len(raw.ch_names) > 100: #ignore EEG only datasets (OPMEEG)
  78. #apply third order gradient compensation (if not already done)
  79. raw.apply_gradient_compensation(3)
  80. if subject=='02':
  81. raw.resample(1200)
  82. #define event IDs
  83. events, event_dict=mne.events_from_annotations(raw)
  84. #mark breaks in the data
  85. break_annots = mne.preprocessing.annotate_break(
  86. raw=raw,
  87. events=events,
  88. min_break_duration=9, # consider segments of at least 5 s duration
  89. t_start_after_previous=4, # buffer time after last event, carefull of edge effects
  90. t_stop_before_next=4 # stop annotation 4 s before beginning of next one
  91. )
  92. raw.set_annotations(raw.annotations + break_annots) #Mark breaks in raw data
  93. #Remove spikes from data
  94. #Reject by amplitude, use standard deviation of the raw data
  95. raw_tmp=raw.copy().pick_types(meg=True,eeg=False,ref_meg=False).resample(500).filter(l_freq=highpass, h_freq=lowpass)
  96. dat=raw_tmp.get_data(picks='meg',reject_by_annotation='omit')
  97. p2p=((np.abs(np.diff(dat,axis=1))))
  98. n_sds=15 #how many SD to set as threshold
  99. spike_annots, spike_bads = mne.preprocessing.annotate_amplitude(
  100. raw_tmp,
  101. peak=np.median(p2p)+np.std(p2p)*n_sds
  102. )
  103. raw.set_annotations(raw.annotations + spike_annots) #add these annotations to the raw data
  104. all_raw.append(raw) #add annotated raw session to the whole
  105. raw=mne.concatenate_raws(all_raw, on_mismatch='warn')
  106. #get events from concatenated RAW
  107. events, event_dict=mne.events_from_annotations(raw)
  108. #Recode events such that standard sounds preceding an oddbal are coded differently.
  109. events[:,2][np.where(events[:,2]==2)[0]-1]=6
  110. event_dict['std_preOdd'] = 6
  111. #save event structure for trial order reconstruction
  112. print('Saving events')
  113. ev_file=op.join(data_path,'group','MMN',subject+'_SQUID_eve.fif')
  114. mne.write_events(ev_file, events,overwrite=True)
  115. #select true standard tone event
  116. event_ids=np.unique(events[:,2])
  117. event_count=[np.sum(events[:,2]==d) for d in event_ids]
  118. std_id=event_ids[np.array(event_count).argsort()][-1:][0]
  119. std_code=[s for s in event_dict.keys() if event_dict[s]==std_id]
  120. #Split data in MEG and EEG data
  121. raw_meg=raw.copy().pick_types(meg=True,eeg=False,ref_meg=True)
  122. raw_eeg=raw.copy().pick_types(meg=False,eeg=True,ref_meg=True)
  123. if subject=='04':
  124. picks_eog=['EEG064-2800']
  125. else:
  126. picks_eog=['EEG063-2800','EEG064-2800']
  127. raw_eog=raw.copy().pick_channels(picks_eog)
  128. picks_eeg=[c for c in raw_eeg.ch_names if c not in picks_eog]
  129. raw_eeg=raw_eeg.pick_channels(picks_eeg) #remove eog from EEG
  130. #filter raw data
  131. raw_eog_filt=raw_eog.copy().notch_filter(freqs=line_freq).filter(l_freq=highpass, h_freq=lowpass)
  132. raw_meg_filt=raw_meg.copy().notch_filter(freqs=line_freq).filter(l_freq=highpass, h_freq=lowpass)
  133. raw_eeg_filt=raw_eeg.copy().notch_filter(freqs=line_freq).filter(l_freq=highpass, h_freq=lowpass)
  134. if subject=='09':
  135. print('WARNING: Check raw data for residual bad sections!')
  136. #Create downsampled datasets for ICA
  137. raw_meg_ICA=raw_meg_filt.copy().resample(500)
  138. raw_eeg_ICA=raw_eeg_filt.copy().resample(500)
  139. #ICA
  140. ica_meg = mne.preprocessing.ICA(n_components=30,method='fastica',random_state=42)
  141. ica_meg.fit(raw_meg_ICA)
  142. if not use_previous_rejection:
  143. ica_meg.plot_sources(raw_meg_ICA)
  144. ica_meg.plot_components()
  145. #BAD MEG ICA components
  146. ICA_meg_reject = {
  147. '01' : [0,1,13.25],
  148. '02' : [7,10,16,23,29],
  149. '04' : [6,14,24],
  150. '06' : [0,7,11],
  151. '07' : [6,11,22],
  152. '08' : [1,6,9,10],
  153. '09' : [4,6,23,28], #depends on manual marking of bad areas!
  154. '10' : [1,4,24],
  155. '14' : [0,2,4,28],
  156. '15' : [2,7,9,10],
  157. '16' : [3,5,15],
  158. '17' : [0,2,3,16],
  159. '18' : [0,5,8],
  160. '19' : [0,4,13],
  161. '21' : [0,1,5,12,25],
  162. '22' : [0,16,20],
  163. '24' : [0,4,6,28]
  164. }
  165. if use_previous_rejection:
  166. raw_meg_clean=ica_meg.apply(raw_meg_filt,exclude=ICA_meg_reject[subject])
  167. else:
  168. raw_meg_clean=ica_meg.apply(raw_meg_filt)
  169. #inspect EEG for bad channels
  170. if not use_previous_rejection:
  171. raw_eeg_ICA.plot()
  172. #MARK bad channel(s) in browser
  173. bad_channels = {
  174. '01' : [15],
  175. '02' : [15],
  176. '04' : [15,62],
  177. '06' : [15],
  178. '07' : [15],
  179. '08' : [2,15],
  180. '09' : [15],
  181. '10' : [15],
  182. '14' : [15],
  183. '15' : [15],
  184. '16' : [15],
  185. '17' : [15],
  186. '18' : [15],
  187. '19' : [15],
  188. '21' : [15],
  189. '22' : [15],
  190. '24' : [15]
  191. }
  192. bads = [rename['EEG0' +str(d).zfill(2)+ '-2800'] for d in bad_channels[subject] if d<15]+['EEG0' +str(d).zfill(2)+ '-2800' for d in bad_channels[subject] if d>14]
  193. raw_eeg_ICA.info['bads']=bads
  194. raw_eeg_filt.info['bads']=bads
  195. ica_eeg = mne.preprocessing.ICA(method='fastica',random_state=42)
  196. ica_eeg.fit(raw_eeg_ICA)
  197. if not use_previous_rejection:
  198. ica_eeg.plot_sources(raw_eeg_ICA)
  199. ica_eeg.plot_components()
  200. raw_ep=raw_eeg_filt.copy()
  201. event_id={'1' : event_dict['1'], '2' : event_dict['2']} #Trigger
  202. tmp_epochs=mne.Epochs(raw_ep,events,event_id=event_id,tmin=tmin,tmax=tmax,preload=True)
  203. tmp_epochs.resample(500)
  204. ica_eeg.plot_sources(tmp_epochs)
  205. #Mark BAD EEG ICA components
  206. ICA_eeg_reject = {
  207. '01' : [0,1,3,11],
  208. '02' : [0,6,7],
  209. '04' : [0],
  210. '06' : [0,2,5,10,11,13],
  211. '07' : [0,1],
  212. '08' : [0,1,7],
  213. '09' : [0,1,3,4],
  214. '10' : [1,2,9],
  215. '14' : [0,1,3,7,11],
  216. '15' : [0,1,6],
  217. '16' : [1],
  218. '17' : [0,1,9],
  219. '18' : [0,1,2,3,4],
  220. '19' : [0,7,8],
  221. '21' : [0,1,3],
  222. '22' : [0,7,12],
  223. '24' : [0,1,5]
  224. }
  225. if use_previous_rejection:
  226. raw_eeg_clean=ica_eeg.apply(raw_eeg_filt,exclude=ICA_eeg_reject[subject])
  227. else:
  228. raw_eeg_clean=ica_eeg.apply(raw_eeg_filt)
  229. #add EOG back in
  230. raw_meg_clean.add_channels([raw_eog_filt])
  231. raw_eeg_clean.add_channels([raw_eog_filt])
  232. #Bandpass filter
  233. print('Wide Bandpass filter')
  234. raw_meg_filt=raw_meg_clean.filter(l_freq=None, h_freq=lowpass_final) # bandpass
  235. raw_eeg_filt=raw_eeg_clean.filter(l_freq=None, h_freq=lowpass_final) # bandpass
  236. ## EPOCH
  237. #get events
  238. print('Creating epoch')
  239. event_id_std={std_code[0] : event_dict[std_code[0]]} #Standard tone (exl pre-odd)
  240. event_id_odd={'2' : event_dict['2']} #Trigger
  241. event_id_stdPreOdd={'std_preOdd' : event_dict['std_preOdd']} #Trigger
  242. event_id_all={std_code[0] : event_dict[std_code[0]],'2' : event_dict['2'], 'std_preOdd' : event_dict['std_preOdd']} #Trigger
  243. #Cut epochs
  244. meg_epochs_odd=mne.Epochs(raw_meg_clean,events,event_id=event_id_odd,tmin=tmin,tmax=tmax,preload=True)
  245. meg_epochs_std=mne.Epochs(raw_meg_clean,events,event_id=event_id_std,tmin=tmin,tmax=tmax,preload=True)
  246. meg_epochs_stdPreOdd=mne.Epochs(raw_meg_clean,events,event_id=event_id_stdPreOdd,tmin=tmin,tmax=tmax,preload=True)
  247. meg_epochs_all=mne.Epochs(raw_meg_clean,events,event_id=event_id_all,tmin=tmin,tmax=tmax,preload=True)
  248. eeg_epochs_odd=mne.Epochs(raw_eeg_clean,events,event_id=event_id_odd,tmin=tmin,tmax=tmax,preload=True)
  249. eeg_epochs_std=mne.Epochs(raw_eeg_clean,events,event_id=event_id_std,tmin=tmin,tmax=tmax,preload=True)
  250. eeg_epochs_stdPreOdd=mne.Epochs(raw_eeg_clean,events,event_id=event_id_stdPreOdd,tmin=tmin,tmax=tmax,preload=True)
  251. eeg_epochs_all=mne.Epochs(raw_eeg_clean,events,event_id=event_id_all,tmin=tmin,tmax=tmax,preload=True)
  252. #now resample to output sampling rate
  253. print('Resampling.')
  254. meg_epochs_odd.resample(final_samp_rate)
  255. meg_epochs_std.resample(final_samp_rate)
  256. meg_epochs_stdPreOdd.resample(final_samp_rate)
  257. meg_epochs_all.resample(final_samp_rate)
  258. eeg_epochs_odd.resample(final_samp_rate)
  259. eeg_epochs_std.resample(final_samp_rate)
  260. eeg_epochs_stdPreOdd.resample(final_samp_rate)
  261. eeg_epochs_all.resample(final_samp_rate)
  262. #Correct eye movement artifacts using regression
  263. print('Correcting for eye movements')
  264. meg_epochsTMP=meg_epochs_all.subtract_evoked() #create epochs for regression estimation
  265. eeg_epochsTMP=eeg_epochs_all.subtract_evoked()
  266. if subject=='04':
  267. picks_eog=['EEG064-2800']
  268. else:
  269. picks_eog=['EEG063-2800','EEG064-2800']
  270. meg_epochsTMP.set_eeg_reference(ref_channels=[])
  271. eeg_epochsTMP.set_eeg_reference('average')
  272. #fit model
  273. meg_model_EOG = mne.preprocessing.EOGRegression(picks='meg',picks_artifact=picks_eog).fit(meg_epochsTMP)
  274. eeg_model_EOG = mne.preprocessing.EOGRegression(picks='eeg',picks_artifact=picks_eog).fit(eeg_epochsTMP)
  275. #apply model
  276. meg_epochs_odd.set_eeg_reference(ref_channels=[])
  277. meg_epochs_std.set_eeg_reference(ref_channels=[])
  278. meg_epochs_stdPreOdd.set_eeg_reference(ref_channels=[])
  279. meg_epochs_all.set_eeg_reference(ref_channels=[])
  280. meg_epochs_odd=meg_model_EOG.apply(meg_epochs_odd)
  281. meg_epochs_std=meg_model_EOG.apply(meg_epochs_std)
  282. meg_epochs_stdPreOdd=meg_model_EOG.apply(meg_epochs_stdPreOdd)
  283. meg_epochs_all=meg_model_EOG.apply(meg_epochs_all)
  284. eeg_epochs_odd.set_eeg_reference('average')
  285. eeg_epochs_std.set_eeg_reference('average')
  286. eeg_epochs_stdPreOdd.set_eeg_reference('average')
  287. eeg_epochs_all.set_eeg_reference('average')
  288. eeg_epochs_odd=eeg_model_EOG.apply(eeg_epochs_odd)
  289. eeg_epochs_std=eeg_model_EOG.apply(eeg_epochs_std)
  290. eeg_epochs_stdPreOdd=eeg_model_EOG.apply(eeg_epochs_stdPreOdd)
  291. eeg_epochs_all=eeg_model_EOG.apply(eeg_epochs_all)
  292. #drop eog
  293. print('Removing EOG from data')
  294. meg_epochs_odd=meg_epochs_odd.pick_types(meg=True,eeg=False,ref_meg=True)
  295. meg_epochs_std=meg_epochs_std.pick_types(meg=True,eeg=False,ref_meg=True)
  296. meg_epochs_stdPreOdd=meg_epochs_stdPreOdd.pick_types(meg=True,eeg=False,ref_meg=True)
  297. meg_epochs_all=meg_epochs_all.pick_types(meg=True,eeg=False,ref_meg=True)
  298. eeg_epochs_odd=eeg_epochs_odd.pick_channels(picks_eeg)
  299. eeg_epochs_std=eeg_epochs_std.pick_channels(picks_eeg)
  300. eeg_epochs_stdPreOdd=eeg_epochs_stdPreOdd.pick_channels(picks_eeg)
  301. eeg_epochs_all=eeg_epochs_all.pick_channels(picks_eeg)
  302. #baselining
  303. print('Baselining')
  304. meg_epochs_odd.apply_baseline(baseline=(bl_min,bl_max))
  305. meg_epochs_std.apply_baseline(baseline=(bl_min,bl_max))
  306. meg_epochs_stdPreOdd.apply_baseline(baseline=(bl_min,bl_max))
  307. meg_epochs_all.apply_baseline(baseline=(bl_min,bl_max))
  308. eeg_epochs_odd.apply_baseline(baseline=(bl_min,bl_max))
  309. eeg_epochs_std.apply_baseline(baseline=(bl_min,bl_max))
  310. eeg_epochs_stdPreOdd.apply_baseline(baseline=(bl_min,bl_max))
  311. eeg_epochs_all.apply_baseline(baseline=(bl_min,bl_max))
  312. #Autoreject
  313. #MEG
  314. if use_autoreject:
  315. print('MEG - Using autoreject to discard artifactual epochs')
  316. rejectTHRES = ar.get_rejection_threshold(meg_epochs_all, decim=2,random_state=42,ch_types='mag') #get AR threshold
  317. print('MEG Threshold: ' +str(rejectTHRES['mag']))
  318. drop_odd=meg_epochs_odd.copy().drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  319. print('MEG - Odd condition portion of data kept: ' +str(len(drop_odd)/np.shape(meg_epochs_odd)[0]*100)+ '%')
  320. meg_epochs_odd=meg_epochs_odd.drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  321. drop_std=meg_epochs_std.copy().drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  322. print('MEG - Std condition portion of data kept: ' +str(len(drop_std)/np.shape(meg_epochs_std)[0]*100)+ '%')
  323. meg_epochs_std=meg_epochs_std.drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  324. drop_stdPreOdd=meg_epochs_stdPreOdd.copy().drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  325. print('MEG - Std preceding Odd condition portion of data kept: ' +str(len(drop_stdPreOdd)/np.shape(meg_epochs_stdPreOdd)[0]*100)+ '%')
  326. meg_epochs_stdPreOdd=meg_epochs_stdPreOdd.drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  327. print('EEG: Using autoreject to discard artifactual epochs')
  328. rejectTHRES = ar.get_rejection_threshold(eeg_epochs_all, decim=2,random_state=42,ch_types='eeg') #get AR threshold
  329. print('Threshold: ' +str(rejectTHRES['eeg']))
  330. drop_odd=eeg_epochs_odd.copy().drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  331. print('EEG Odd - Portion of data kept: ' +str(len(drop_odd)/np.shape(eeg_epochs_odd)[0]*100)+ '%')
  332. eeg_epochs_odd=eeg_epochs_odd.drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  333. drop_std=eeg_epochs_std.copy().drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  334. print('EEG Std - Portion of data kept: ' +str(len(drop_std)/np.shape(eeg_epochs_std)[0]*100)+ '%')
  335. eeg_epochs_std=eeg_epochs_std.drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  336. drop_stdPreOdd=eeg_epochs_stdPreOdd.copy().drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  337. print('EEG Std preceding Odd - Portion of data kept: ' +str(len(drop_stdPreOdd)/np.shape(eeg_epochs_stdPreOdd)[0]*100)+ '%')
  338. eeg_epochs_stdPreOdd=eeg_epochs_stdPreOdd.drop_bad(reject=rejectTHRES,verbose='WARNING') #check resulting rejection
  339. #save
  340. print('Saving epochs..')
  341. meg_epochs_odd.save(op.join(data_path,'group','MMN','epochs',subject+'_SQUID_odd-epo.fif'),overwrite=True)
  342. meg_epochs_std.save(op.join(data_path,'group','MMN','epochs',subject+'_SQUID_std-epo.fif'),overwrite=True)
  343. meg_epochs_stdPreOdd.save(op.join(data_path,'group','MMN','epochs',subject+'_SQUID_stdPreOdd-epo.fif'),overwrite=True)
  344. eeg_epochs_odd.save(op.join(data_path,'group','MMN','epochs',subject+'_SQUIDEEG_odd-epo.fif'),overwrite=True)
  345. eeg_epochs_std.save(op.join(data_path,'group','MMN','epochs',subject+'_SQUIDEEG_std-epo.fif'),overwrite=True)
  346. eeg_epochs_stdPreOdd.save(op.join(data_path,'group','MMN','epochs',subject+'_SQUIDEEG_stdPreOdd-epo.fif'),overwrite=True)
  347. print('Done.')
  348. #Create evoked
  349. meg_evoked_odd=meg_epochs_odd.average()
  350. meg_evoked_std=meg_epochs_std.average()
  351. meg_evoked_stdPreOdd=meg_epochs_stdPreOdd.average()
  352. eeg_evoked_odd=eeg_epochs_odd.average()
  353. eeg_evoked_std=eeg_epochs_std.average()
  354. eeg_evoked_stdPreOdd=eeg_epochs_stdPreOdd.average()
  355. #save
  356. print('Saving evoked..')
  357. meg_evoked_odd.save(op.join(data_path,'group','MMN','evoked',subject+'_SQUID_odd-ave.fif'),overwrite=True)
  358. meg_evoked_std.save(op.join(data_path,'group','MMN','evoked',subject+'_SQUID_std-ave.fif'),overwrite=True)
  359. meg_evoked_stdPreOdd.save(op.join(data_path,'group','MMN','evoked',subject+'_SQUID_stdPreOdd-ave.fif'),overwrite=True)
  360. eeg_evoked_odd.save(op.join(data_path,'group','MMN','evoked',subject+'_SQUIDEEG_odd-ave.fif'),overwrite=True)
  361. eeg_evoked_std.save(op.join(data_path,'group','MMN','evoked',subject+'_SQUIDEEG_std-ave.fif'),overwrite=True)
  362. eeg_evoked_stdPreOdd.save(op.join(data_path,'group','MMN','evoked',subject+'_SQUIDEEG_stdPreOdd-ave.fif'),overwrite=True)
  363. print('Done.')
  364. print('Finished subject ' +subject)

A1_SQUID-SQUIDEEG_preproc.py at commit 5e93aed, no license · at the source

Overview

Authors: Tjerk P Gutteling1,2, Jérémie Mattout2, Sébastien Daligault1, Julien Jung3, Etienne Labyt4, Denis Schwartz1,2, Françoise Lecaignard2
  1. CERMEP‐Imagerie du Vivant, MEG Departement, Lyon, France
  2. CNRS, INSERM, Centre de Recherche en Neurosciences de Lyon CRNL U1028, UMR5292, COPHY, Université Claude Bernard Lyon 1, Bron, France
  3. CNRS, INSERM, Centre de Recherche en Neurosciences de Lyon CRNL U1028, UMR5292, EDUWELL, Université Claude Bernard Lyon 1, Bron, France
  4. MAG4Health, Grenoble, France
Journal: n/a, volume 46, issue 14, article e70368
Dates: received 14 March 2025; accepted 17 September 2025; published online 27 September 2025; in print October 2025
Type: Other · Language: English
License: none stated
Identifiers: DOI 10.1002/hbm.70368 · PMCID PMC12476031 · OpenAlex W4414565259
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: EEG (modality), MEG (modality), human (organism), cognitive (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Evoked potentials, Physiology & signal measures
Keywords: auditory, EEG, MEG, MMN, OPM
MeSH: Auditory Perception*, Brain*, Electroencephalography*, Evoked Potentials, Auditory*, Magnetoencephalography*, Magnetometry*, Acoustic Stimulation, Adult, Female, Humans, Male, Young Adult (* major topic)
Topic: Neuroscience and Music Perception (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Région Auvergne-Rhône-Alpes; France Life Imaging (ANR-11-INBS-0006); Labex Cortex (ANR-11-LABX-0042)
Citations: cited by 4 papers (Europe PMC); 65 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (none stated) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

Its files are read in the Code ↔ Paper reader above, with 12 matches between paragraphs and lines of code.

tgutteling/OPM_MMN

License: none: the authors keep all their rights
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 5e93aeda27c2708aca8653052b2c08eb1943976e, 21 October 2025
Languages: Python (16)
Size: 17 files, 16 scripts
Software Heritage: not archived
Found in: “Data Availability Statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (16 files), MNE-Python (16 files), NumPy (16 files), SciPy (7 files), seaborn (4 files), autoreject (3 files), scikit-learn (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
17 files

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 16 scripts, each with its path and the digest of its content;
  • 12 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Code and data availability statement

The paper has a code and data availability statement. Its license (none stated) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • it points to the authors' code: tgutteling/OPM_MMN
  • it says that the data are available on request

Read it in the paper: doi.org/10.1002/hbm.70368.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 7 authors, 5 keywords, 12 MeSH terms, 3 funders, 65 references.

Cite

This paper

Gutteling, T. P., Mattout, J., Daligault, S., Jung, J., Labyt, E., Schwartz, D., & Lecaignard, F. (2025). The Mismatch Negativity Compared: EEG, SQUID‐MEG, and Novel 4 Helium‐OPMs. Human Brain Mapping, 46(14), e70368. https://doi.org/10.1002/hbm.70368

BibTeX

@article{gutteling2025mismatch,
author = {Gutteling, Tjerk P and Mattout, Jérémie and Daligault, Sébastien and Jung, Julien and Labyt, Etienne and Schwartz, Denis and Lecaignard, Françoise},
title = {{The Mismatch Negativity Compared: EEG, SQUID‐MEG, and Novel 4 Helium‐OPMs}},
journal = {Human Brain Mapping},
year = {2025},
volume = {46},
number = {14},
pages = {e70368},
publisher = {Wiley},
issn = {1065-9471},
doi = {10.1002/hbm.70368},
url = {https://doi.org/10.1002/hbm.70368},
pmcid = {PMC12476031}
}

RIS

TY - JOUR
AU - Gutteling, Tjerk P
AU - Mattout, Jérémie
AU - Daligault, Sébastien
AU - Jung, Julien
AU - Labyt, Etienne
AU - Schwartz, Denis
AU - Lecaignard, Françoise
TI - The Mismatch Negativity Compared: EEG, SQUID‐MEG, and Novel 4 Helium‐OPMs
T2 - Human Brain Mapping
J2 - Hum Brain Mapp
PY - 2025
DA - 2025
VL - 46
IS - 14
SP - e70368
SN - 1065-9471
PB - Wiley
DO - 10.1002/hbm.70368
UR - https://doi.org/10.1002/hbm.70368
LA - en
ER -

CSL-JSON

{
"id": "10.1002/hbm.70368",
"type": "article-journal",
"title": "The Mismatch Negativity Compared: EEG, SQUID‐MEG, and Novel 4 Helium‐OPMs",
"container-title": "Human Brain Mapping",
"author": [
{
"family": "Gutteling",
"given": "Tjerk P"
},
{
"family": "Mattout",
"given": "Jérémie"
},
{
"family": "Daligault",
"given": "Sébastien"
},
{
"family": "Jung",
"given": "Julien"
},
{
"family": "Labyt",
"given": "Etienne"
},
{
"family": "Schwartz",
"given": "Denis"
},
{
"family": "Lecaignard",
"given": "Françoise"
}
],
"container-title-short": "Hum Brain Mapp",
"volume": "46",
"issue": "14",
"page": "e70368",
"DOI": "10.1002/hbm.70368",
"PMCID": "PMC12476031",
"ISSN": "1065-9471",
"publisher": "Wiley",
"URL": "https://doi.org/10.1002/hbm.70368",
"language": "en",
"issued": {
"date-parts": [
[
2025
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1162/imag.a.1040 [code]
Novel 4 He-OPMs support waveform-specific beta burst analysis comparable to SQUID-MEG
Journal: n/a
In common: autoreject, MNE-Python, scikit-learn, 3 other tools, MEG, 14 references, author Tjerk P Gutteling
[2] doi:10.1038/s41598-026-41129-7 [code]
Non-linear relationships between auditory mismatch responses and the inharmonicity of complex sounds.
Journal: Scientific reports
In common: autoreject, MNE-Python, seaborn, 3 other tools, EEG, cognitive, 5 references
[3] doi:10.1162/imag.a.1269 [code]
From early to contemporary normative modeling: Mapping individual differences in neurophysiological signals.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: autoreject, MNE-Python, seaborn, 4 other tools, MEG, EEG, 2 references
[4] doi:10.1093/nc/niag029 [code]
A data-driven approach to identifying and evaluating connectivity-based neural correlates of conscious visual perception.
Journal: Neuroscience of consciousness
In common: autoreject, MNE-Python, seaborn, 4 other tools, MEG, cognitive, 2 references
[5] doi:10.7554/elife.108023 [code]
Challenges in replay detection by TDLM in post-encoding resting state.
Journal: eLife
In common: autoreject, MNE-Python, seaborn, 4 other tools, MEG, 2 references
[6] doi:10.1162/imag.a.1321 [code]
Phase similarity between similar objects indicates representational merging across retrieval training but not sleep.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: autoreject, MNE-Python, seaborn, 4 other tools, EEG, cognitive, 2 references
[7] doi:10.1109/tmi.2026.3687982 [code]
Spatial-Jitter Model for Magnetoencephalography Sensor Arrays.
Journal: IEEE transactions on medical imaging
In common: MNE-Python, SciPy, Matplotlib, 1 other tool, MEG, 4 references
[8] doi:10.1038/s41597-025-05174-7 [code]
A large-scale MEG and EEG dataset for object recognition in naturalistic scenes
Journal: n/a
In common: MNE-Python, seaborn, scikit-learn, 3 other tools, MEG, EEG, 3 references
[9] doi:10.1038/s41598-026-58505-y [code]
Remoteness sensitive theta network dynamics during early autobiographical memory access.
Journal: Scientific reports
In common: autoreject, MNE-Python, seaborn, 3 other tools, EEG, cognitive, 2 references
[10] doi:10.1371/journal.pcbi.1014302 [code]
Trial-level sequence modeling reveals hidden dynamics of dual-task interference.
Journal: PLoS computational biology
In common: autoreject, MNE-Python, seaborn, 4 other tools, EEG, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.