print '\tinhibitory', inhibit print '\texcitatory', excite # test whether variables are statistically different between inhibitory and excitatory neurons _, std_err_p = manu(inhibit_df['std_err'].values, excite_df['std_err'].values) _, length_p = manu(inhibit_df['length'].values, excite_df['length'].values) _, recip_n_p = manu(inhibit_df['n'].values, excite_df['n'].values) print '\np-values for significance between individual inhibitory and excitatory variables' print '\tstd_err_p', std_err_p print '\tlength_p', length_p print '\tn_p', recip_n_p # make plots distribution_plot(cre_dict, 2, 6, xlabel='spike cut length standard error', ylabel='expVar GLIF3') distribution_plot(cre_dict, 3, 6, xlabel='spike cut length', ylabel='expVar GLIF3') distribution_plot(cre_dict, 4, 6, xlabel='ave number of noise 1 spikes', ylabel='expVar GLIF3') distribution_plot(cre_dict, 5, 6,
specimen_ID = os.path.basename(folder)[:9] pp_file = get_pp_path(folder) pp_dict = ju.read(pp_file) cre = os.path.basename(folder)[10:] all_neurons.append([ specimen_ID, cre, pp_dict['spike_cut_length']['no deltaV shift']['slope'], pp_dict['spike_cut_length']['no deltaV shift']['intercept'] * 1000., pp_dict['spike_cut_length']['no deltaV shift']['length'] * 1000. * pp_dict['dt_used_for_preprocessor_calculations'] ]) (cre_dict) = check_and_organize_data(all_neurons) distribution_plot(cre_dict, 3, 2, ylabel='Slope (mV/mS)', xlabel='Intercept (mV)') distribution_plot(cre_dict, 4, 2, ylabel='Slope (mV/mS)', xlabel='Spike cut length (ms)') specimen_id = 474637203 #htr3 make_plots(specimen_id) specimen_id = 512322162 #ctgf make_plots(specimen_id)
1.e12, #total charge pp_dict['resistance']['R_from_lims']['value'], #7 pp_dict['capacitance']['C_from_lims']['value'], #8 pp_dict['capacitance']['C_test_list']['mean'] * pp_dict['resistance']['R_test_list']['mean'] * 1.e3 ]) (cre_dict) = check_and_organize_data(all_neurons) #--------------------------------------------------- #---plotting simple cap versus resistance no asc---- #--------------------------------------------------- percentile_dict = distribution_plot(cre_dict, 2, 4, xlabel='R (MOhms)', ylabel='C (pF)') plt.annotate('Resistance Fit Without ASC', xy=(.5, .93), xycoords='figure fraction', horizontalalignment='center', verticalalignment='bottom', fontsize=22) #------------------------------------------------------ #---plotting simple cap versus tau with no ASC--------- #------------------------------------------------------ percentile_dict = distribution_plot(cre_dict, 9, 4,
pp_file = get_pp_path(folder) pp_dict = ju.read(pp_file) if pp_dict['threshold_adaptation'][ 'a_voltage_comp_of_thr_from_fitab'] is not None and pp_dict[ 'threshold_adaptation'][ 'b_voltage_comp_of_thr_from_fitab'] is not None: all_neurons.append([ specimen_ID, cre, pp_dict['threshold_adaptation']['a_voltage_comp_of_thr_from_fitab'] / pp_dict['threshold_adaptation'] ['b_voltage_comp_of_thr_from_fitab'], np.log10(pp_dict['threshold_adaptation'] ['b_voltage_comp_of_thr_from_fitab']) ]) else: raise Exception('this should not have made it though the exclusions') cre_dict = check_and_organize_data(all_neurons) percentile_dict = distribution_plot(cre_dict, 2, 3, xlabel=r'$a_v/b_v$', ylabel=r'log$_{10}(b_v)$') #plt.annotate('Voltage Component of Threshold', xy=(.5, .93), # xycoords='figure fraction', # horizontalalignment='center', verticalalignment='bottom', # fontsize=22) plt.show()
LIFASC_dict['th_opt']['absolute'] * 1e3, #9 LIFASC_dict['th_opt']['from_zero'] * 1e3, #10 LIFRASC_dict['th_opt']['absolute'] * 1e3, #11 LIFRASC_dict['th_opt']['from_zero'] * 1e3, #12 LIFRASCAT_dict['th_opt']['absolute'] * 1e3, #13 LIFRASCAT_dict['th_opt']['from_zero'] * 1e3 ]) #14 (cre_dict) = check_and_organize_data( all_neurons) #organizes data into format used for distribution plotting percentile_dict = distribution_plot(cre_dict, 3, 2, xlabel='Resting potential (mV)', ylabel=r'Measured $\theta_{\infty}$ (mV)') percentile_dict = distribution_plot( cre_dict, 3, 4, xlabel='Resting potential (mV)', ylabel=r'Measured $\Delta V$ $\theta_{\infty}$ (mV)') plt.figure() for cre in cre_dict: for neuron in cre_dict[cre]: plt.plot(neuron[2], neuron[5], '.', ms=12, color=color_dict[cre]) plt.xlabel(r'Measured $\theta_{\infty}$ (mV)') plt.ylabel(r'GLIF$_1$ $\theta_{\infty}$ (mV)') # plt.title('absolute threshold')
folders = [os.path.join(data_path, f) for f in os.listdir(data_path)] all_neurons = [] for folder in folders: specimen_ID = os.path.basename(folder)[:9] cre = os.path.basename(folder)[10:] try: file = get_file_path_endswith(folder, '_GLIF2_neuron_config.json') except: continue neuron_dict = ju.read(file) all_neurons.append([ specimen_ID, cre, neuron_dict['threshold_reset_method']['params']['a_spike'] * 1.e3, 1. / neuron_dict['threshold_reset_method']['params']['b_spike'] * 1.e3 ]) (cre_dict) = check_and_organize_data(all_neurons) percentile_dict = distribution_plot(cre_dict, 2, 3, xlabel=r'$\delta \Theta_s (mV)$', ylabel=r'$1/b_s (ms)$') ##--------------plot examples----------------------------- make_plots(474637203) #htr3 make_plots(512322162) #ctgf