Ejemplo n.º 1
0
           linewidth=3,
           color='w')
plt.vlines(x=int(timebins / 2), ymin=0, ymax=neurons - 1)

timebined_sorted_frs_around_suc_trials_tr = np.transpose(
    timebined_sorted_normalised_frs_around_suc_trials, [1, 2, 0])
timebined_sorted_frs_around_random_tr = np.transpose(
    timebined_sorted_normalised_frs_around_random, [1, 2, 0])
p_values_pokes_vs_random, cluster_labels_poke_vs_random = \
    cl_per.monte_carlo_significance_probability(timebined_sorted_frs_around_suc_trials_tr, timebined_sorted_frs_around_random_tr,
                                                num_permutations=5000, min_area=4, cluster_alpha=0.05,
                                                monte_carlo_alpha=0.05, sample_statistic='independent',
                                                cluster_statistic='maxarea')

data = avg_timebined_sorted_normalised_frs_around_suc_trials
cluster_labels = cluster_labels_poke_vs_random
plf.show_significant_clusters_on_data(data,
                                      cluster_labels,
                                      region_lines,
                                      np.arange(neurons),
                                      window_time=8,
                                      colormap='binary',
                                      markers='o',
                                      alpha=0.6,
                                      marker_color='b')
plt.vlines(x=0, ymin=0, ymax=neurons - 1)
plt.title(const.rat_folder)

# </editor-fold>
# ----------------------------------------------------------------------------------------------------------------------
Ejemplo n.º 2
0
    cl_per.monte_carlo_significance_probability(lfps_around_tp_smooth_right, lfps_around_ntp_smooth_right,
                                                num_permutations=1000, min_area=10, cluster_alpha=0.05,
                                                monte_carlo_alpha=0.01, sample_statistic='independent',
                                                cluster_statistic='maxsum')

p_values_left, cluster_labels_under_alpha_left = \
    cl_per.monte_carlo_significance_probability(lfps_around_tp_smooth_left, lfps_around_ntp_smooth_left,
                                                num_permutations=1000, min_area=10, cluster_alpha=0.05,
                                                monte_carlo_alpha=0.01, sample_statistic='independent',
                                                cluster_statistic='maxsum')

pos = list(const.BRAIN_REGIONS.values())
data = lfps_around_tp_smooth_left.mean(-1)
cluster_labels = cluster_labels_under_alpha_left
plf.show_significant_clusters_on_data(data,
                                      cluster_labels,
                                      pos,
                                      lfp_probe_positions,
                                      window_time=8)

data = lfps_around_tp_smooth_right.mean(-1)
cluster_labels = cluster_labels_under_alpha_right
plf.show_significant_clusters_on_data(data,
                                      cluster_labels,
                                      pos,
                                      lfp_probe_positions,
                                      window_time=8)

# </editor-fold>
# -------------------------------------------------