tfrStats.plot_mvtfr_stats module

tfrStats.plot_mvtfr_stats.plot_mvtfr_stats(tfr, tfr_null, fband, alpha, correction)[source]

Plot empirical Multi-variate TFR and stats results

This functions use load_uv_tfrs, as well as optionally get_pvals_minmax, get_pvals_whole and (also optionally) cluster_correction to plot the empirical TFR, the p-values and the corrected threshold. Correction for multiple comparisons is already taken into account by get_pvals_minmax and get_pvals_whole. Optionally, cluster_correction corrects the p-values for multiple comparisons using a distance threshold for neighbours frequencies and time bins if they are alltogheter above alpha.

Todo

  • Handle parameters with dictionary.

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