BRAINSTORM TRAINING
Tak a inas Medani, Guioma Niso
Raymundo Cassani & Anne-Sophie Duba y
Tak a inas Medani,
Resea ch Scien is , B ain Imaging G oup,
Uni e si y o Sou he n Cali o nia,
Los Angeles, USA ([email p o ec ed])
Guioma Niso,
Head o he Neu oimaging G oup,
Cajal Ins i u e, CSIC, Mad id, Spain
(guioma [email p o ec ed])
1
Dea B ains o m pa icipan s,
As he 3 d edi ion o he P ac ical MEEG e en app oaches, we would like o sha e some impo an
in o ma ion o help you p epa e in ad ance.
P epa a ion Be o e he Wo kshop:
To ensu e a smoo h and p oduc i e expe ience, please comple e he ollowing asks be o e you a i al:
1. Ins all MATLAB
● I needed, a ee ial e sion o MATLAB is p o ided by he P ac icalMEEG eam o he
Hands-On sessions.
● Please make su e i is ully ins alled and ac i a ed be o e he wo kshop.
● We ecommend o add he “Signal P ocessing Toolbox”
2. Ins all B ains o m so wa e:
● Regis e on he B ains o m websi e: B ains o m Regis a ion.
● Download and ins all he la es e sion by ollowing he B ains o m Ins alla ion Guide.
● Please ensu e he so wa e is ully ins alled and ho oughly es ed.
2. Download he da ase :
● Please download he da ase s in ad ance o a oid delays du ing he sessions:
○ P uned e sion o he da ase (~1Go) <download om Zenodo>
○ B ains o m p ocessed da a 16 pa icipan s (~20Go) <download om B ains o m>
3. P epa e you lap op:
● Ensu e bo h MATLAB and B ains o m a e ins alled and es ed.
● Ha e he da ase s eady o immedia e use.
● B ing you own compu e , cha ge , mouse, and elec ical adap o i needed.
● We also highly ecommend b inging an ex e nal mouse o be e usabili y.
We kindly ask all pa icipan s o comple e he ins alla ions and downloads be o e he e en . I you
encoun e any issues, please pos you ques ions he e so he eam can assis you.
A de ailed walk h ough will be pos ed he e in he coming days.
We look o wa d o seeing you soon and hope you enjoy an engaging and hands-on expe ience a P ac ical
MEEG!
Bes ,
Tak a inas and Guioma o he B ains o m eam
===============================================
Upda es o be pos ed on he o um:
📦
P ac icalMEEG 2025 — Da a Package Upda es
We ha e p uned and eo ganized he da a o include only he essen ial iles equi ed o he wo kshop.
All necessa y da ase s a e now p o ided in a smalle , eady- o-use olde ha includes he Zenodo da a and
complemen a y ma e ials.
The ollowing ma e ial olde con ains: (size ~5Go)
● ds000117_p uned.zip — P uned e sion o he o iginal da ase , including T1 MRI and DWI da a.
● emma _ enso s.ma — Realis ic FEM head model wi h mesh and conduc i i y enso s ( om DWI).
● P ac icalMEEG_sub-01_3- uns.zip — P ep ocessed da a o subjec sub-01 wi h 3 uns (senso , o wa d,
sou ce, and TF da a).
● P ac icalMEEGG oup_p uned.zip — G oup-le el da a om 16 subjec s (6 uns each), con aining in a-subjec
olde s only; MEG sou ce maps o Face–Sc amble e ained.
● Readme. x — O e iew and ins uc ions o he P ac icalMEEG 2025 wo kshop ma e ials.
2
In oduc ion
The aim o hese hands-on sessions is o guide pa icipan s h ough a comp ehensi e MEG/EEG
p ep ocessing and analysis pipeline using B ains o m. The wo k low will go om aw da a p ep ocessing o
sou ce es ima ion, g oup-le el s a is ics, and esul s isualiza ion, ollowing bes p ac ices o open and
ep oducible neu oimaging esea ch. The wo k low p esen ed con ibu es o a communi y-wide ini ia i e o
documen and ha monize MEG/EEG analysis pipelines, as ea u ed in he F on ie s Resea ch Topic “F om
Raw MEG/EEG o Publica ion: How o Pe o m MEG/EEG G oup Analysis wi h F ee Academic So wa e,”
whe e he B ains o m pipeline was ea u ed in Tadel e al. (2019).
The main goal is o in oduce B ains o m o new use s. Some o he ope a ions and he analysis p esen ed
he e a e no de ailed. Fo in-dep h explana ions o he in e ace and heo e ical ounda ions, please e e o
he in oduc ion u o ials.
Da ase
We will use he W&H da ase , which has been ecen ly e o ma ed acco ding o he B ain Imaging Da a
S uc u e (BIDS) s anda d. BIDS ensu es consis en da a o ganiza ion and acili a es in e ope abili y ac oss
neu oimaging analysis ools. The da ase comp ises simul aneous MEG and EEG eco dings om 16
pa icipan s pe o ming a simple isual ecogni ion ask ha in ol es he p esen a ion o amous,
un amilia , and sc ambled aces.
You can download he da a he e: [don' download all he da a, please ead all ins uc ions i s ]
● O iginal aw da a (~180Go) <Zenodo> o <OpenNeu o (ds000117)>
● P uned e sion o he da ase (~1Go) <download om Zenodo (ds000117_p uned)>
● B ains o m p ocessed da a o he 16 pa icipan s (~20Go) <download om B ains o m>
● P ac icalMEEG 2025: Da a Package Final(~5Go) <P ac icalMEEG2025_FinalMa e ials.zip>
Re e ences
This da ase is made a ailable unde he C ea i e Commons A ibu ion 4.0 In e na ional Public License.
Please ci e he ollowing e e ence i you use hese da a:
● Wakeman DG, Henson RN, A mul i-subjec , mul i-modal human neu oimaging da ase , Scien i ic
Da a (2015).
Please ci e he ollowing e e ence i you use he B ains o m analysis pipeline:
● Tadel F, Bock E, Niso G, Moshe JC, Cousineau M, Pan azis D, Leahy RM, Baille S, MEG/EEG G oup
Analysis Wi h B ains o m, F on ie s in Neu oscience (2019)
● Tadel F, Baille S, Moshe JC, Pan azis D, Leahy RM, B ains o m: A use - iendly applica ion o
MEG/EEG Analysis Compu In ell Neu osci (2011)
No es
This da ase is o ma ed acco ding o he BIDS-MEG speci ica ions (Niso e al. 2018); he e o e, we can
impo all ele an in o ma ion (MRI, F eeSu e segmen a ion, MEG+EEG eco dings) in jus one click, wi h
he menu File > Load p o ocol > Impo BIDS da ase . Please ollow he online u o ial MEG es ing s a e &
OMEGA da abase.
I you da a does no ollow he BIDS s anda d, his u o ial p o ides a s ep-by-s ep guide o he manual
impo p ocess. We also include addi ional s eps equi ed due o da a anonymiza ion (de aced MRIs and
missing acquisi ion da es). We will wo k on impo ing and p ocessing he i s un o subjec #01. The same
p ocedu e applies o all o he pa icipan s and uns.
B ains o m download and ins alla ion
B ains o m is a ailable in bo h an open-sou ce MATLAB applica ion (MATLAB license equi ed) and a
s andalone Ja a execu able ( ee). Please ollow he ins alla ion ins uc ions o a comple e ins alla ion and
con igu a ion: h ps://neu oimage.usc.edu/b ains o m/Ins alla ion. Fo he wo kshop, we will use he
MATLAB e sion[check he pos on he o um].
⚠ Ha ing any issues: ☞h ps://neu oimage.usc.edu/b ains o m/Wo kshopGene alIns all
3
In oduc ion o B ains o m In e ace
CLOSE ALL YOUR APPLICATIONS, INCLUDING WEB BROWSERS
4
DAY1: Tuesday, Oc 28 – AM Session
Ge o know you da a
10:10-10:35 In oduc ion o B ains o m (lec u e)
10:35-11:00 Re iew eco ding
● C ea e a new p o ocol. File > New p o ocol: “P ac icalMEEG”
No, use indi idual ana omy
No, use one channel ile pe acquisi ion un (MEG/EEG)
● In oduc ion o da abase explo e (lis o p o ocols, explo a ion modes…)
● Righ -click on p o ocol op node > New subjec >sub-01
Lea e he de aul op ions you de ined o he p o ocol.
📜
You can ind mo e de ails he e:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/C ea eP o ocol
● Swi ch o unc ional iew (2nd bu on abo e he da abase explo e )
● C ea e a link o he con inuous ile:
Righ -click on sub-01 > Re iew aw ile
File o ma : MEG/EEG: Elek a-Neu omag (*. i )
Selec olde :
ds000117_p uned/de i a i es/meg_de i a i es/sub-01/ses-meg/meg/
File: sub-01_ses-meg_ ask- ace ecogni ion_ un-01_p oc-sss_meg. i
Selec op ion: E en channel > STI101
● Edi he channel ypes:
Righ -click on he Neu omag channel ile > Edi channel ile
Change he ypes: EEG061>Misc, EEG062>EOG, EEG063>ECG, EEG064>Misc.
Close and sa e
● Re iew MEG: Righ -click on “Link o aw ile” > MEG (all) > Display ime se ies
Display in columns + channel selec ion (click o mon age) => Le Tempo al
Time: Display windows o 5s
Ampli ude: Bu ons and sho cu s
Sc oll o de ec he beginning o he con inuous head localiza ion (248s), Online
il e s
E en s: Lis , igu e, ime ba , display modes (do s o lines)
● Edi /combine e en s
Selec 5+6+7: E en s > Me ge g oups > Famous
Selec 13+14+15: E en s > Me ge g oups > Un amilia
Selec 17+18+19: E en s > Me ge g oups > Sc ambled
Dele e all he o he ca ego ies o e en s
E en s > Add ime o se : Famous, Un amilia , Sc ambled 34.5ms (delay)
● Add o he iews
EEG: Righ -click on “Link o aw ile” > EEG > Display ime se ies
ECG: Righ -click on “Link o aw ile” > ECG > Display ime se ies
EOG: Righ -click on “Link o aw ile” > EOG> Display ime se ies
Topog aphy: Righ -click on “Link o aw ile” > EEG > 2D Senso Cap (o
CTRL+T)
Layou menu: Al e na e be ween Tiled and Weigh ed (keep Weigh ed)
● Close all + Sa e modi ica ion
11:00-11:15 Spec al inspec ion and il e ing
● D ag and d op he “Link o aw ile” in P ocess1
Explain he P ocess1 ab + Fil e box
● Run p ocess: “F equency > Powe spec um densi y (Welch)”:
Time window: [250, 300]s, Window leng h: 4s, Senso ype: MEG, EEG, PSD op ions:
Edi … > OK. Click Run. Open he PSD ile (double-click)
5
Open opog aphy: EEG > 2D Senso cap
Open opog aphy: MEG (mag) > 2D Senso cap
Open opog aphy: MEG (g ad no m) > 2D Senso cap
Explain he noise sou ces / iden i y possible bad channels:
(~10Hz:alpha, 50Hz: powe , ~300Hz: HPC(248s), EEG016 bad)
● Op ional: emo e line noise (la e low-pass il e a 40 will be applied)
Keep he "Link o aw ile" in P ocess1.
Selec p ocess P e-p ocess > No ch il e (50, 100, 150, 200).
Add he p ocess F equency > Powe spec um densi y (Welch)
Double-click on he PSD o he new con inuous ile o e alua e he
quali y o he co ec ion.
● Run p ocess: “P e-p ocess > Band-pass il e ”:
MEG, EEG Lowe cu o : 0 Hz (No high-pass il e )
Uppe cu o : 40 Hz (Low-pass il e )
📜
Mos il e s cause edge e ec s, i.e. un eliable segmen s o da a a he beginning
and he end o he signal. When applied o sho epochs, hey migh con amina e all
he da a o in e es . Lea n mo e abou il e s he e:
Epoch_leng h: h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Epoching#Epoch_leng h
Wha il e s o apply:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/A i ac sFil e #Wha _ il e s_ o_apply.3F
11:15-11:45 A i ac s de ec ion and cleaning
● Bad channels & Re- e e ence he EEG eco dings
Righ click on “Raw | low” > EEG > Display ime se ies
Ma k EEG016 as bad
Reco d ab: A i ac s > Re- e e ence EEG: AVERAGE
● De ec eye-mo emen e en s
Open he ime se ies o MEG and EOG
In he Reco d ab, selec A i ac s > De ec eye blinks:
Channel name = EEG062, Time window = All ile,
E en name = blink
Display MEG signals (along EOG) and see some blink occu ences
Me ge all he bink e en g oups in a blinks g oup
● De ec hea bea e en s
Open he ime se ies o MEG and ECG (se Du a ion o 1 s)
In he Reco d ab, selec A i ac s > De ec hea bea s, and use he pa ame e s:
Channel name = EEG063, Time window = All ile, E en name = ca diac
● Handle simul aneous e en s
In he Reco d ab, selec A i ac s > Remo e simul aneous:
Remo e e en s named: ca diac
When oo close o e en s: blinks
Minimum delay be ween e en s: 250 ms
● Remo e hea bea a i ac s om MEG wi h SSP
Open he ime se ies o MEG
In he Reco d ab, selec A i ac s > SSP: Hea bea s, and use he pa ame e s:
E en name = ca diac, Senso s = MEG Compu e using exis ing = Check
In he Selec ac i e p ojec o s window, uncheck all componen s
Highligh he i s wo and plo hem ( )
Open MEG (all) and ECG ime se ies, and disable au o scaling in he 3 plo s
Check Componen #1 o e i y he impac o emo ing i om he MEG signal
Click on Sa e, and close all igu es
● Op ional: Remo e blink a i ac s om he EEG wi h ICA
Open he ime se ies o EEG
In he Reco d ab, selec A i ac s > ICA componen s, and use he pa ame e s:
Time window = [226- 400], Senso ype: EEG, Band-pass il e = [0, 0], Resample
= 0
6
ICA algo i hm = Pica d, Numbe o ICA componen s = 0
So componen s based on co ela ion wi h = EOG, ECG
In he Selec ac i e p ojec o s window, uncheck all ICA componen s.
Highligh a ew and plo hem.
Open EEG and EOG ime se ies and disable au o scaling in he 3 plo s (check he shape)
Check Componen #1 o e i y he impac o emo ing i om he EEG signal
Click on Sa e, and close all igu es
11:45-12:00 Epoching and single ials e iewing
● Righ -click on he p e-p ocessed ile (Raw | low) > Impo in o da abase
Time window = 226.0 - 716.99 s ( his is se au oma ically)
Uncheck Spli
Check Use e en s and selec Famous, Un amilia , and Sc ambled
Epoch ime = om -500 ms o 1200 ms
Check Apply SSP/ICA p ojec o s
Check Remo e DC o se , selec Time ange [-500, 0]
Uncheck C ea e a sepa a e olde o each ype
Click on Impo
A new olde wi hou he ' aw' indica ion is c ea ed
DAY1: Tuesday, Oc 28 – PM Session
Senso -le el Analysis & equency space analysis
15:15-15:45 Senso le el a e ages (ERP/ERF)
● Re iew ials:
Open he i s ial MEG+EEG: Swi ch back o bu e ly iew, ALL
senso s. Open a 2D opog aphy (CTRL+T)
Enable au o-scale (bu on [AS]). Na iga e be ween ials wi h F3 /
Shi +F3 (Fn + F3 on Mac)
T ials o channels can be ma ked as bad independen ly
📜
Read mo e abou he keyboa d sho cu s:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Explo eReco dings#Keyboa d_sho cu s
● Ras e plo s: Righ -click on ials > Display as image > EEG (EEG065)
You can change he selec ed senso wi h he d op-down menu in he
Display ab, o use he up/down a ows on you keyboa d
The bad ials a e al eady ma ked, bu i hey we e no , his iew could
help you iden i y hem easily.
● A e age ials
D ag and d op all he ial g oups in P ocess1
Run p ocess “A e age > A e age iles”: By ial g oup ( olde a e age)
● Re iew a e age
Open Famous a e age: MEG + 2D
opog aphy iew + EEG Re iew mo ie o he
ac i i y (hold igh /le keys/ il e ab)
Display wi h a low-pass il e a 32Hz
● Channel Clus e /Single channel
Close all and open EEG: Signals + all
opog aphy modes.
Open he Clus e ab and c ea e a clus e wi h he channel EEG065
(bu on [NEW IND]). O e lay EEG065 o 3 a e ages wi h Clus e ab
(NEW IND). O e lay a e ages wi h 2DLayou
Display Mean + S d : “Edi > Se Clus e unc ion > Mean”
📝
Plo he ial a e age ime se ies o elec ode EEG056
7
📜
Read mo e he e abou Clus e s:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/ChannelClus e s
Snapsho > Time con ac shee opog aphy wi h 2D Disc:
0ms, 500ms, 16 images Mo ies…
● Basic obse a ions o ERP EEG065 ( igh pa ie o-occipi al elec ode):
A ound 170ms (N170): g ea e nega i e de lec ion o Famous han Sc ambled
aces.
A e 250ms: di e ence be ween Famous and Un amilia aces.
15:45-16:45 TF Wa ele s Analysis
● Wa ele s
D ag-d op all he Famous ials in P ocess1
Add p ocess: F equency > Time- equency (Mo le wa ele s)
Click on Edi …
Time de ini ion = Same as inpu iles,
F equency de ini ion = Linea : 5 : 2 : 60
Cen al eq = 1 Hz, Time esolu ion 3 s
Measu e = Powe , Selec Sa e indi idual
Add p ocess: File > Add ag
Tag o add = Famous, Selec Add o ile name
Display ime- equency a e age:
Smoo h display and hide edge e ec s o channel EEG056
● Explo e ime- equency esul s
Display 2D Layou (maps): Selec a ew senso s
Change colo map: Maximum -10/+10, colo map ype
Add iews: ime se ies + powe spec um + all he o he op ions
● P ocessing he ime- equency esul s
Run p ocess: S anda dize > Baseline no maliza ion > Z-sco e: [-200, 0]ms
Add p ocess: Ex ac > Ex ac ime: [-200, 900]ms, O e w i e.
[To emo e he sec ion o he da a wi h edge e ec s]
📜
Check his link o mo e in o ma ion:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/VisualSingle#Time- equency_analysis
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/TimeF equency
● Op ional: Hilbe ans o m and Mul i ape
Selec all he Famous ials in P ocess1
○ Add p ocess F equency > Hilbe ans o m:
Senso ype = MEG only
Mo le wa ele op ions:
Time de ini ion = Same as inpu iles, F equency de ini ion =
G oup [Rese ]
Measu e = Powe , Selec Sa e a e age
○ Add he p ocess: File > Add ag
Tag o add = Famous, Selec Add o ile name
Display bo h ime- equency ep esen a ions ( om wa ele s and Hilbe ans o m):
Smoo h display and hide edge e ec s
📜
Read mo e he e Mul i ape ( h ough Field ip):
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Epilep ogenici y#Time- equency_analysis_.28p e-onse _
baseline.29
Op ional: Connec i i y senso le el [no desc ibed in he o iginal da a/pape ]
Selec all he Famous A e age ials in P ocess1
Run p ocess: Connec i i y> Co ela ion NxN > 100-500ms, EEG,
Righ -click on he connec i i y node, Display as G aph o as Image
8
Check mo e op ions o he g aph he e:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Connec i i yG aph
📜
Read mo e abou connec i i y in B ains o m he e:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Connec i i y
PAC/sou ce le el he e: h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Res ing
Discussions:
B ains o m beyond he GUI
● In e ac ion wi h o he oolboxes: FieldT ip, MNE-Py hon, EEGLAB, SPM
● Plugins: a ailable plugins
● Gi Hub: epo and collabo a ion
DAY2: Wednesday, Oc 29 – AM Session
Sou ce le el es ima ion I: Ge ing o sou ce le el maps
10:10-10:45 Impo ana omy
● Swi ch o ana omy iew (1s bu on abo e he da abase explo e )
● Righ -click on sub-01 > Impo ana omy olde File o ma : F eeSu e
Selec olde : de i a i es/ eesu e /sub-01/ses-m i/ana
Numbe o e ices: 10000 (lowe alue o make i as e ).
● In oduc ion o he MRI iewe :
Explo ing he olume (click, mouse wheel, slide s),
Colo maps, colo ba , igu e popup menu
● Compu e MNI ans o ma ion, ma 8 (se s all he iducials
au oma ically)
● Check he posi ions o NAS / LPA / RPA
Explain he coo dina es (MRI, SCS, MNI)
Click sa e, his will c ea e he “co ex” ile
📜
The MNI ans o ma ion au oma ically se s de aul NAS/LPA/RPA iducials based on
MNI coo dina es. Since MEG-MRI co egis a ion will use digi ized head poin s, p ecise
iducial placemen isn’ c i ical, unless he e’s no good head shape o he co egis a ion
looks poo , in which case he iducials should be manually ma ked ollowing he MRI
acquisi ion con en ion.
Head Model Gene a ion
📜
The o wa d models depend on he subjec 's ana omy, including head size and geome y, issue
conduc i i y, he compu a ional me hod, and senso cha ac e is ics. In he ollowing sec ions, we will
p esen he wo app oaches a ailable in B ains o m o cons uc ing he head model o EEG: he Bounda y
Elemen Me hod (BEM) and he Fini e Elemen Me hod (FEM). Howe e , only he BEM me hod is used in
he subsequen sec ions. Fo he MEG, we will use he o e lapping sphe es. Fo mo e de ailed
documen a ion, please e e o:
h ps://neu oimage.usc.edu/b ains o m/Tu o ials/HeadModel
Gene a e BEM head su aces om he MRI:
● Swi ch o ana omy iew: (1s bu on, on op o he da abase explo e )
Op ional: Righ -click on sub-01 > MRI segmen a ion > Gene a e head su ace > OK
This will gene a e a su ace ile named “head mask” es ima ed om he T1 MRI.
● Righ -click on sub-01 > MRI segmen a ion > Gene a e BEM su aces
Selec B ains o m
Numbe o e ices: Scalp = 642, Ou e skull = 642, and Inne skull = 642
Thickness o laye s, Skull (mm)= 4
Click OK [This p ocess will ake ~2min]
This will gene a e h ee su aces (head, ou e skull, and inne skull)
Demo: Gene a e FEM om BEM su aces (simpli ied model):
○ P ess and hold “C l”, hen selec wi h he mouse he BEM su aces
9
● EEGLAB: Func ions embedded in he B ains o m dis ibu ion ( unica.m)
● SPM: Expo o .nii o .gii iles (online u o ial)
📜
Read mo e he e: Expo o SPM:
An al e na i e o unning he s a is ical es s in B ains o m is o expo all he da a and compu e he es s
using an ex e nal p og am (such as R, MATLAB, o SPM).
Mul iple menus exis o expo iles o ex e nal ile o ma s ( igh -click on a ile > File > Expo o ile).
Two u o ials explain how o expo da a speci ically o SPM:
● Expo sou ce maps o SPM8 ( olume)
● Expo sou ce maps o SPM12 (su ace)
📜
Read mo e abou s a is ics in B ains o m: h ps://neu oimage.usc.edu/b ains o m/Tu o ials/S a is ics
I ime allows, explain how o gene a e he sc ip s and download he da a o he nex session.
How o w i e you own p ocess: h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Tu Use P ocess
Sc ip ing: h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Sc ip ing#Loop_o e _subjec s
DAY4: F iday, Oc 31
AM Session: Ge and epo esul s wi h con idence II – Mul i a ia e app oach
10:15-12:00 G oup le el analysis
Subjec G and a e ages:
In his session, we will use a p ecompu ed B ains o m p o ocol o 16 subjec s wi h 6 sessions. We will
conduc g oup-le el analysis ac oss he di e en condi ions.
In he B ains o m window, click on File > Load p o ocol > Load om zip ile and selec he p ecompu ed
p o ocol <P ac icalMEEGG oup_p uned.zip> om he p o ided ma e ial olde . Once comple ed, you
should see he 16 subjec s lis ed in he Ana omy and Func ional abs.
Summa y o he analysis:
● Subjec and g and a e ages o each condi ion (Famous, Un amilia , Sc ambled).
● No maliza ion o hese a e ages (Z-sco e o he sou ces, o ERS/D o he ime- equency maps).
● P ojec ion o he sou ces esul s on a empla e and spa ial smoo hing o he sou ce maps.
● Con as be ween aces ( amous+un amilia ) and non- aces (sc ambled): di e ence o a e ages and
signi icance es .
● Con as be ween amous aces and un amilia aces: di e ences in a e ages and signi icance es s.
● Senso s o in e es : EEG070 (o EEG060 o EEG065 i EEG070 is ma ked as bad)
The me hodology we will ollow o compu ing a e ages and o he s a is ics is desc ibed in he u o ial
"Wo k lows".
No e: This session demons a es how o un he analysis using he in e ace (B ains o m GUI), bu o la ge
da ase s, manual p ocessing is ine icien and e o -p one. Use s a e encou aged o sc ip g oup analyses
ins ead, i s p o o yping he analysis pipeline o a ew subjec s using he in e ac i e in e ace, hen
gene a ing he co esponding MATLAB sc ip , and inally unning i on all subjec s o ep oducibili y. Sc ip
c ea ion is de ailed in he online Sc ip ing u o ial.
Subjec a e ages: Fil e and no malize
Be o e compa ing he a e ages ac oss subjec s, we will low-pass il e he
signals below 32Hz ( o smoo h possible la ency di e ences be ween
subjec s) and no malize he sou ce & TF alues wi h espec o a baseline.
● EEG/MEG Senso
In P ocess 1, selec all he In a-subjec olde s om all subjec s,
and hen selec [P ocess eco dings].
16
Fo a as e selec ion, you can use he "Func ional da a (so ed by condi ions)" iew. [64 iles]
Selec p ocess P e-p ocess > Band-pass il e : 0Hz-32Hz, MEG, EEG, 60dB, 2019,
O e w i e.
Add p ocess Ex ac > Ex ac ime: Time window=[-200,900]ms, o e w i e
Selec ing a smalle ime window elimina es mos o he possible edge e ec s caused by
he il e .
Add p ocess A e age > A e age iles: By ial g oup (g and a e age)
A i hme ic a e age, no weigh ed. Click Run.
A new i em labeled “G oup Analysis” will appea in he da abase explo e ha has he same s uc u e as a
subjec . I con ains he a e age o he 16 iles om all 16 subjec s o each condi ion.
- Fo he "G oup analysis/In e -subjec " olde : he a iable e e s o he subjec s (a e age o 16 iles o
subjec s)
- Fo he "sub-XX/in a-subjec " olde : he a iable e e s o he uns [sessions] (a e age o 6 iles o
sessions)
📝
I is ok o compa e EEG senso subjec a e ages, bu i is no he case o MEG senso subjec a e ages.
Why?
No e ha a e aging MEG eco dings ac oss subjec s is no accu a e; howe e , i can be used o ob ain a
gene al idea o he g oup e ec s ( o mo e in o ma ion).
● MEG Sou ces
In P ocess 1, selec all he In a-subjec olde s om all subjec s, and hen selec [P ocess sou ces]
16 iles a ailable, he p o ided da a con ains only he MEG [ ace-sc amble]
Selec p ocess P e-p ocess > Band-pass il e : 0Hz-32Hz, 60dB, MEG, O e w i e
Add p ocess Ex ac > Ex ac ime: Time window=[-200,900]ms
Add p ocess S anda dize > Baseline no maliza ion: Baseline=[-200,-5]ms, Z-sco e, O e w i e.
Click Run.
Th ee ags a e added o he iles: “ low(32Hz) | ime (-202ms,900ms) | zsco e”
● Op ional: Time equency
○ In P ocess 1, selec all he In a-subjec olde s om all subjec s, and hen selec [P ocess
ime- eq].
○ Run p ocess S anda dize > Baseline no maliza ion: Baseline=[-200,-5]ms, ERS/ERD, O e w i e
One ag is added a he end o he commen s o he a e aged ime- equency maps.
Senso Di e ence: Faces - Sc ambled:
● Di e ences o a e ages
We could compu e he con as s di ec ly om he g and a e ages, bu we will do i om he subjec
a e ages because he same ile selec ion will be used o he s a is ics (nex s ep).
In P ocess2: FilesA = all he Faces subjec a e ages ( om he In a-subjec olde s).
In P ocess2: FilesB = all he Sc ambled subjec a e ages ( om he In a-subjec olde s).
Run p ocess: Tes > Di e ence o means: A i hme ic a e age, No weigh ed. Click Run.
● Signi icance es ing
In P ocess2: Keep he same ile selec ion.
Run p ocess: Tes > Pa ame ic es : Pai ed: All ile, All senso s, No a e age, wo- ailed.
Rename he ile: Faces - Sc ambled: Pa ame ic - es . Display wi h α=0.05,
FDR-co ec ed.
We can un o he es s in a simila way, wi h almos iden ical esul s.
P ocess: Tes > Pe mu a ion es : Pai ed: All ile, All senso s, Pai ed - es , 1000
andomiza ions. Display wi h α=0.05, FDR-co ec ed.
P ocess: Tes > FieldT ip: _ imelocks a is ics: All ile, EEG, Pai ed - es , 1000
andomiza ions, co ec ion=clus e , clus e alpha=0.05.
No e: The clus e -based s a is ics mus be execu ed on one ype o senso a a ime (EEG, MEG, MAG, o
MEG GRAD), because i ies o iden i y spa io- empo al clus e s ha g oup adjacen senso s.
17
Bonus: His og ams checking he dis ibu ion o he da a:
In P ocess1: all he Faces subjec a e ages ( om he In a-subjec olde s).
Run p ocess Ex ac > Ex ac alues:
Op ions: Time=[160,160]ms, Senso ="MEG2321", Conca ena e ime
(dimension 2)
Do he same o he Sc ambled
To display he dis ibu ion o he alues in hese wo iles:
selec hem simul aneously, igh -click > File > View his og ams.
Exe cice: Famous - Un amilia
● Di e ences o a e ages
In P ocess2: FilesA = all he Famous subjec a e ages ( om he In a-subjec olde s).
In P ocess2: FilesB = all he Un amilia subjec a e ages ( om he In a-subjec olde s).
Run p ocess: Tes > Di e ence o means: A i hme ic a e age, No weigh ed.
Rename he ile: Famous - Un amilia .
● Signi icance es ing
In P ocess2: Keep he same ile selec ion.
Run p ocess: Tes > Pa ame ic es : Pai ed: All ile, All senso s, No a e age, wo- ailed.
Rename he ile: Faces - Sc ambled: Pa ame ic - es . Display wi h α=0.05, FDR-co ec ed.
In P ocess2: Keep he same ile selec ion.
Run p ocess: Tes > Pa ame ic es : Pai ed: All ile, All senso s, No a e age, wo- ailed.
Rename he ile: Faces - Sc ambled: Pa ame ic - es . Display wi h α=0.05, FDR-co ec ed.
G oup analysis: Sou ces (only MEG: Faces-Sc ambled; online u o ial includes all da a)
P ojec sou ces on empla e
The sou ces we e es ima ed on he indi idual ana omy o each subjec ; he esul ing co ical sou ce maps
canno be a e aged di ec ly. We i s need o e-in e pola e all he indi idual esul s on a common empla e
( he ICBM152 b ain, a ailable in he "de aul ana omy" olde o he p o ocol). We also need o ex ac he
absolu e alues o hese sou ce maps: he sign o he minimum no m maps a e
ela i e o he o ien a ion o he cu en wi h espec o he su ace no mal, which
can a y be ween subjec s.
● In P ocess1, selec all he In a-subjec olde s om all he subjec s, selec
[P ocess sou ces].
Fo a as e selec ion, you can use he iew "Func ional da a (so ed by
condi ions)".
● Selec p ocess P e-p ocess > Absolu e alues, O e w i e.
● Add p ocess Sou ces > P ojec on de aul ana omy, selec Co ex su ace.
Click Run.
Check he co egis a ion p ocess
● In subjec sub-01 olde In a-subjec sou ces)
18
Righ -click on i > Co ical ac i a ions > Display on co ex
Righ -click on i > Co ical ac i a ions > Display on sphe es
● In subjec G oup analysis olde In a-subjec sou ces
Righ -click on i > Co ical ac i a ions > Display on co ex
Righ -click on i > Co ical ac i a ions > Display on sphe es
● Se he back iew, il ed owa ds he on , and use he same iew o all plo s
Reduce he su ace smoo hness in bo h co ices o app ecia e ha hey a e di e en
Spa ial smoo hing
The sou ce maps es ima ed wi h cons ained o ien a ions can show e y ocal ac i i y: wo adjacen e ices
may ha e e y di e en no mals, and he e o e e y di e en cu en alues. When a e aging mul iple
subjec s, he peaks o ac i i y may no align e y well ac oss subjec s. Smoo hing spa ially he sou ce maps
may help ob ain be e g oup esul s.
● In P ocess 1, selec all he sou ce maps in G oup Analysis.
● Run p ocess Sou ces > Spa ial smoo hing: use absolu e, FWHM 3mm, ixed FWHM, o e w i e
MEG: mean (|Faces-Sc ambled|)
● In P ocess1, selec all he sou ce iles in G oup_analysis/Faces-Sc ambled|MEG
● Run p ocess A e age > A e age iles: By olde (g and a e age), A i hme ic A e age, No weigh ed
● Click Run
Regions o in e es : OFA (Occipi al Face A ea), FFA (Fusi o m Face A ea), V1
MEG: Chi2- es |Faces-Sc ambled|=0
● In P ocess1, selec all he sou ce iles in G oup_analysis/Faces-Sc ambled|MEG
● Run p ocess Tes > Pa ame ic es agains ze o: All ile, One-sample Chi2- es wo- ailed
● Sc een cap u e: α=0.05 FDR-co ec ed
📝
Wha is he a ea whe e he Faces shows a highe ac i a ion han Sc ambled?
Read mo e: MEG isual u o ial: G oup analysis
Bonus: Decoding wi h c oss- alida ion
In his session, we will demons a e how o pe o m MEG/EEG decoding wi hin B ains o m, a ype o
mul i a ia e pa e n analysis (MVPA), using suppo ec o machines (SVMs). SVM decoding equi es he
LibSVM lib a y (websi e). B ains o m will ins all i au oma ically as a plugin when needed. On Linux and
MacOS, you may ha e o explici ly ecompile he lib a y:
● In he MATLAB command window, execu e "which s m ain". I i e u ns an e o message
('s m ain' no ound), you need o compile he lib a y manually.
● Loca e he MATLAB sub- olde in he libs m ins alla ion olde :
$HOME/.b ains o m/plugins/libs m/libs m-mas e /ma lab
● In MATLAB, na iga e o his olde and execu e he "make.m" unc ion.
● I i doesn' wo k, please e e o he ins uc ions in he README ile loca ed in he same olde .
● You need a C compile o be a ailable on you compu e . Mac use s can use XCode.
C oss- alida ion is a model alida ion echnique used o assess how he esul s o ou decoding analysis
gene alize o an independen da ase . He e we will use he ials om he sub-01; please swi ch o you
p e ious p o ocol wi h one subjec .
We equi e indi idual ials o pe o m his analysis. Swi ch o any p o ocol whe e you
ha e he indi idual ials. Fo example, he “P ac icalMEEG” p o ocol
● Sc ambled and Famous ials o he P ocess1 ab
● Selec p ocess "Decoding > SVM decoding"
Senso EEG, Low pass 32Hz, N pe mu a ions 50, N olds
5, Decoding pai wise, Run
● Repea he same s eps o MEG
In ui i ely, you migh ha e expec ed o use he P ocess2
ab o decode amous s. sc ambled. Howe e , he
decoding p ocess is also designed o handle pai wise
decoding o mul iple classes (no jus wo classes) o
compu a ional e iciency, allowing mo e han wo
19
ca ego ies o be en e ed in he P ocess1 ab.
The p ocess will ake some ime. The esul s a e hen sa ed in a ile wi hin he decoding olde . The
esul ing ma ix ep esen s he decoding accu acy o e ime. The le plo shows EEG decoding accu acy,
and he igh plo shows MEG esul s o dis inguishing be ween sc ambled and amous aces. Bo h cu es
illus a e how e ec i ely he classi ie dis inguishes be ween he wo condi ions o e ime. MEG gene ally
shows a sha pe and highe decoding peak han EEG, which is mo e a ec ed by olume conduc ion and
a i ac s. Decoding accu acy inc eases a ound 150–250 ms, sugges ing ha he neu al ep esen a ions o
aces and sc ambled images di e mos du ing his ime window. To explo e his u he , one could ocus
he analysis on his speci ic pe iod.
Tempo al gene aliza ion:
Repea he abo e p ocess, bu selec 'Tempo al Gene aliza ion'.
The p ocess will ake mo e ime (~10 minu es pe modali y). The esul s a e hen sa ed in a ile in he
'decoding' olde .
Bo h EEG and MEG decoding e ealed disc imina ion be ween amous and sc ambled aces s a ing a ound
150 ms. MEG showed s onge and mo e sus ained accu acy (150–600 ms), indica ing a s able neu al
ep esen a ion o ace ca ego y in o ma ion. EEG decoding was weake and mo e ansien (180–300 ms),
e lec ing apid changes in scalp pa e ns and lowe spa ial speci ici y due o olume conduc ion.
Read mo e he e: h ps://neu oimage.usc.edu/b ains o m/Tu o ials/Decoding
========================================================================================
💬
We’d lo e o hea you eedback
Scan he QR code o help us make
B ains o m e en be e .
20