np.mean(timebined_sorted_special_normalised_frs_around_random, axis=0)), aspect='auto') plt.hlines(y=neurons - region_lines, xmin=0, xmax=timebins - 1, 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> lfps_around_tp_smooth = np.load( join(lfp_average_data_folder, 'lfps_around_tp_smooth.npy')) lfps_around_ntp_smooth = np.load( join(lfp_average_data_folder, 'lfps_around_ntp_smooth.npy')) lfps_around_tp_smooth_left = lfps_around_tp_smooth[np.arange(0, 72, 2)] lfps_around_tp_smooth_right = lfps_around_tp_smooth[np.arange(1, 72, 2)] lfps_around_ntp_smooth_left = lfps_around_ntp_smooth[np.arange(0, 72, 2)] lfps_around_ntp_smooth_right = lfps_around_ntp_smooth[np.arange(1, 72, 2)] p_values_right, cluster_labels_under_alpha_right = \ 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,