Dear Carina,

Thank you for replying me.

Yes, from the experiment we expect to see the low frequency around theta and alpha. According to the guide FLUX, I can successfully extract the power with multitapper.

def power_function(data):

freqs = np.arange(2, 31, 1)

n_cycles = freqs / 2

time_bandwidth = 2.0

```
power_data = mne.time_frequency.tfr_multitaper(
data,
freqs=freqs,
n_cycles=n_cycles,
time_bandwidth=time_bandwidth,
picks = 'eeg',
use_fft=True,
return_itc=False,
average=True,
decim=2,
n_jobs= -1,
verbose=True)
return power_data
```

## then I can extract the power from each condition by this code

## power_stay_similarity= power_function(epochs_st_sim)

power_switch_similarity= power_function(epochs_sw_sim)

## then I subtracted to get the contrast of the condition

## #contrast

contrast_power_simstsw= power_stay_similarity.copy()

contrast_power_simstsw_data = power_switch_similarity.get_data() - power_stay_similarity.get_data()

contrast_power_simstsw._data= contrast_power_simstsw_data

## Then after I get the contrast power, I save the contrast power file with this format

## contrast_power_simstsw.save(power_stsw_sim + sub + ā_contrast_power_stsw_sim_tapper12_b-ave-tfr.h5ā,overwrite=True)

## Then I apply permutation to the evoked contrast of all participants total: 35 participants by this code,

from scipy import stats

n_subjects=len(subjects)

p_threshold = 0.05

df = n_subjects - 1 # degrees of freedom for the test

t_threshold = stats.distributions.t.ppf(1 - p_threshold / 2, df=df)

tail = 0 # for two sided test

n_permutations = 50

# Now use the combined adjacency in your cluster analysis

cluster_stats = mne.stats.spatio_temporal_cluster_1samp_test( sub_data, threshold=t_threshold,n_permutations=n_permutations, n_jobs=2, verbose=True, tail=tail,adjacency=tfr_adjacency,step_down_p=0.05, out_type=āindicesā,check_disjoint=True, seed=None)

## T_obs, clusters, p_values, _ = cluster_stats

The original epochs was without baseline then I realized all TFR tutorial apply baseline (None,0) with mode mean by default.

rightnow, by applying the baseline I can get the significant, but it has so many cluster I get. because I expect to sync the result my ERP result but now I got so many cluster, doesāt know which one reliable. I will play with the threshold.

my question now, is there any guideline to apply the correct baseline, I am worry that this is just I got by chance cause I am trying to get solution.

I am appreciate your reply. Thank you very much. Itās really kind of you.

here I attached the result of my cluster permutation

Best,

Risa