tfrStats.tfr_spw_stats_whole module

tfrStats.tfr_spw_stats_whole.tfr_spw_stats_whole(paths, cond, svar, fband, n_perm)[source]

Permutation based TFR statistical asessement based on whole null distribution

Function to compute the null distribution keeping the dimensions of the empirical distribution. When testing using the whole null distribution, the permutations are averaged and the dimensions of the empirical distributions are preserved.

Todo

  • Implement onset shifting to account for whole triakl (in the current example we pool values from the 400-1000 ms time window).

  • Implement compatibilityu with Syncopy (for now it relies on ftPool_… .mat containing the TFRs computed in Fieldtrip).

Parameters:
  • input_path (string) – path to the .npz file.

  • condition (in) – condition index (i.e. 0, 1, 2, 3).

  • svar (int) – spectral power or GPR (not implemented here).

  • fband (int) – frequency band index (i.e. low, high, higher).

  • obs (int) – [nullType, percentile], two integeres: 0 for min-max, 1 for whole, 0-100 percentile.

  • correction (int) – 1 for p-values, 2 for cluster corrected p-values.

  • cluster_size (int) – cluster size.

  • alpha (float) – alpha.

Returns:

empirical time frequency representation n_conds x n_sites x n_freqs x n_time (i.e. 30, 12, 16, 113).

Returns:

null time frequency representation (i.e. 30, 12, 16, 113 or 1000, 30, 12, 16, 2).

Return type:

float

@author: Nicolas Gravel, 19.09.2023