# (EEG Analysis) Comparing scalp topographical distributions of theta activity across multiple conditions

Dear MNE-Python community,

Thank you for having built this great Python package!

I am a student with little experience in the area of EEG analysis. I am currently working on my master thesis. I conducted an EEG experiment with three different conditions (A, B and C). Every participant was exposed to all three conditions (sequentially). I would like to find out whether the different conditions involved different scalp topographical distributions of theta oscillations. I hypothesise (among other things) that participantsâ€™ theta activity in condition C was dispersed over a wider brain area than their theta activity in conditions A and B. I am trying to test this hypothesis, but I am experiencing some difficulties. I hope you can help me. My apologies if any of my questions seem silly.

I am currently taking the following steps:

1. For each participant, I identify all bad channels and I apply independent components analysis (ICA). I have one data file per participant.
2. For each participant, I extract epochs from that participantâ€™s data file.
3. For each participant, I â€˜average the epochs for each conditionâ€™. Example: `conditionAverage_A = epochs[â€˜Aâ€™].average()`.
4. For each condition, I create a list that contains all participant â€˜averagesâ€™ for that condition. Example: `participantAverages_A = [conditionAverage_A_P1, conditionAverage_A_P2, â€¦]`.
5. For each condition, I average all participant â€˜averagesâ€™ for that condition. I call the resulting averages (evoked data) â€˜sample averagesâ€™. For example: `sampleAverage_A = mne.combine_evoked(participantAverages_A, weights= 'equal')`.

I now have three â€˜sample averagesâ€™, one for each condition. I would like to do two more things.

[1/2] First of all, for each â€˜sample averageâ€™, I would like to produce a topomap that â€˜displays theta activityâ€™. (I currently define theta activity as activity in the 4 to 7Hz range.) For sampleAverage_A, for instance, I would like to produce a map similar to the one that `epochs[â€˜Aâ€™].plot_psd_topomap(ch_type='eeg', bands=[(4,7,'Thetaâ€™)])` would produce for a single participantsâ€™ epochs for condition A (please see figure 1 below; code adapted from the tutorial â€˜Visualizing epoched dataâ€™). Unfortunately, the `plot_psd_topomap` function does not work for evoked data. I tried to work my way around this by using the following code (adapted from the tutorial â€˜Frequency and time-frequency sensor analysisâ€™; I do not understand every aspect of this code yet).

``````freqs = [4, 7]
power = tfr_morlet(sampleAverages[condition], freqs=freqs, n_cycles = 1, use_fft=True, return_itc=False)
power.plot_topomap(ch_type= 'eeg' , tmin = 0, tmax = 1, fmin=4, fmax=7, mode= 'mean' , show_names=True,
baseline=(None, None), title= â€˜Condition A (Theta)â€™ , show=True)
``````

The result can be found in figure 2 below . Is there perhaps a way to get an image that is even more similar to the one produced by the `plot_psd_topomap` function?

[2/2] Secondly, I would also like to statistically examine whether participantsâ€™ theta activity was more widely distributed in condition C than it was in conditions A and B. I currently think the â€˜Permutation t-test on source data with spatio-temporal clusteringâ€™ tutorial would be most relevant tutorial for me to look at, but I lack the experience required to assess whether that is indeed correct. Could you perhaps tell me whether or not I am on the right track, and if not, could you perhaps point me to the tutorial that you think would be most relevant for me?