This commit is contained in:
saschuta 2024-05-18 12:15:48 +02:00
parent 396347bd74
commit f1b588d9ae
21 changed files with 395 additions and 1123 deletions

View File

@ -1,5 +1,4 @@
from threefish.utils0 import p_units_to_show, update_cell_names
from threefish.core_cell_choice import p_units_to_show, update_cell_names
from threefish.plot_suscept import ampullary_punit
if __name__ == '__main__':

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -1,5 +1,5 @@
from threefish.utils0 import p_units_to_show
from threefish.utils1_suscept import fr_name_rm
from threefish.core_cell_choice import p_units_to_show
from threefish.core_plot_labels import label_fr_name_rm
from threefish.plot_suscept import ampullary_punit
if __name__ == '__main__':
@ -7,4 +7,4 @@ if __name__ == '__main__':
#stack_file = pd.read_csv('..\calc_RAM\calc_nix_RAM-eod_2022-01-28-ag-invivo-1_all__amp_20.0_filename_InputArr_400hz_30_P-unitApteronotusleptorhynchus.csv')
cells_plot2 = p_units_to_show(type_here = 'contrasts')#permuted = True,
ampullary_punit(eod_metrice = False, color_same = False,base_extra = True, fr_name = fr_name_rm(), cells_plot2=[cells_plot2[0]], isi_delta = 5, titles=[''],tags_individual = True, xlim_p = [0,1.15])#Low-CV P-unit,
ampullary_punit(eod_metrice = False, color_same = False, base_extra = True, fr_name = label_fr_name_rm(), cells_plot2=[cells_plot2[0]], isi_delta = 5, titles=[''], tags_individual = True, xlim_p = [0, 1.15])#Low-CV P-unit,

Binary file not shown.

View File

@ -1,9 +1,9 @@
from threefish.utils0 import p_units_to_show
from threefish.utils1_suscept import fr_name_rm
from threefish.core_cell_choice import p_units_to_show
from threefish.core_plot_labels import label_fr_name_rm
from threefish.plot_suscept import ampullary_punit
if __name__ == '__main__':
cells_plot2 = p_units_to_show(type_here='contrasts')#permuted = True,
ampullary_punit(base_extra = True,eod_metrice = False, color_same = False, fr_name = fr_name_rm(), tags_individual = True, isi_delta = 5, cells_plot2=[cells_plot2[1]], titles=['', 'Ampullary cell,'],)#High-CV P-unit,
ampullary_punit(base_extra = True, eod_metrice = False, color_same = False, fr_name = label_fr_name_rm(), tags_individual = True, isi_delta = 5, cells_plot2=[cells_plot2[1]], titles=['', 'Ampullary cell,'], )#High-CV P-unit,

Binary file not shown.

View File

@ -2,12 +2,17 @@ from IPython import embed
from matplotlib import gridspec as gridspec, pyplot as plt
import numpy as np
from threefish.utils0 import basename_small, colors_overview, default_figsize, exclude_nans_for_corr, get_grid_4, \
scatter_with_marginals_colorcoded, update_cell_names, \
load_overview_susept, \
make_log_ticks, save_visualization, setting_overview_score, version_final
from threefish.core_plot_labels import pearson_label
from threefish.utils1_suscept import plt_specific_cells, stimname_small, NLI_scorename2_small, start_name
from threefish.core_cell_choice import update_cell_names
from threefish.core_filenames import version_final
from threefish.core_plot_suscept import get_grid_4, scatter_with_marginals_colorcoded
from threefish.defaults import default_figsize
from threefish.core_plot_colors import colors_overview
from threefish.core_reformat import exclude_nans_for_corr, load_overview_susept
from threefish.core_load import save_visualization
from threefish.core_bursts import setting_overview_score
from threefish.core_plot_labels import basename_small, label_NLI_scorename2_small, label_pearson, label_stimname_small, \
make_log_ticks
from threefish.utils1_suscept import plt_specific_cells, start_name
from scipy import stats
try:
from plotstyle import plot_style, spines_params
@ -126,14 +131,14 @@ def data_overview3():
var_item_names = [var_it,var_it,var_it2]#,var_it2]#['Response Modulation [Hz]',]
var_types = ['response_modulation','response_modulation','']#,'']#'response_modulation'
max_x = max_xs[c]
x_axis_names = ['CV$'+basename_small()+'$','CV$'+stimname_small()+'$','Response Modulation [Hz]']#$'+basename()+'$,'Fr$'+basename()+'$',]
x_axis_names = ['CV$' + basename_small() +'$','CV$' + label_stimname_small() + '$', 'Response Modulation [Hz]']#$'+basename()+'$,'Fr$'+basename()+'$',]
#score = scores[0]
score_n = ['Perc99/Med', 'Perc99/Med', 'Perc99/Med']
score = scores[c]
scores_here = [score,score,score]#,score]
score_name = ['max(diag5Hz)/med_diagonal_proj_fr','max(diag5Hz)/med_diagonal_proj_fr']#,'max(diag5Hz)/med_diagonal_proj_fr']#'Perc99/Med'
score_name = ['Fr/Med', 'Fr/Med']#'Fr/Med'] # 'Perc99/Med'
score_name = [NLI_scorename2_small(), NLI_scorename2_small(), NLI_scorename2_small()]#NLI_scorename()] # 'Fr/Med''Perc99/Med'
score_name = [label_NLI_scorename2_small(), label_NLI_scorename2_small(), label_NLI_scorename2_small()]#NLI_scorename()] # 'Fr/Med''Perc99/Med'
ax_j = []
axls = []
axss = []
@ -246,7 +251,7 @@ def data_overview3():
print('frame file lost')
embed()
corr, p_value = stats.pearsonr(x_axis, y_axis)
pears_l = pearson_label(corr, p_value, y_axis, n=True)
pears_l = label_pearson(corr, p_value, y_axis, n=True)
print(start_name(cell_type_here, species) + ' ' + corr_var + ' to '+str(score) + pears_l)
#if corr_var == 'ser_first_base':#
# embed()
@ -256,7 +261,7 @@ def data_overview3():
c_axis, x_axis, y_axis, exclude_here = exclude_nans_for_corr(frame_file, 'fr_base', cv_name='fr_base',
score='cv_base')
corr, p_value = stats.pearsonr(x_axis, y_axis)
pears_l = pearson_label(corr, p_value, y_axis, n=True)
pears_l = label_pearson(corr, p_value, y_axis, n=True)
print(start_name(cell_type_here, species) + ' ' + 'fr_base' + ' to ' + 'cv_base' + pears_l)
@ -266,7 +271,7 @@ def data_overview3():
c_axis, x_axis, y_axis, exclude_here = exclude_nans_for_corr(frame_file, 'burst_fraction_burst_corr_individual_base', cv_name='burst_fraction_burst_corr_individual_base',
score='cv_base')
corr, p_value = stats.pearsonr(x_axis, y_axis)
pears_l = pearson_label(corr, p_value, y_axis, n=True)
pears_l = label_pearson(corr, p_value, y_axis, n=True)
print(start_name(cell_type_here, species) + ' amprange: ' + 'burst_fraction_individual_base' + ' to ' + 'cv_base' + pears_l)
###############################
# fr to nonline but for both modulations
@ -274,7 +279,7 @@ def data_overview3():
c_axis, x_axis, y_axis, exclude_here = exclude_nans_for_corr(frame_file, 'fr_base', cv_name='fr_base',
score=score)
corr, p_value = stats.pearsonr(x_axis, y_axis)
pears_l = pearson_label(corr, p_value, y_axis, n=True)
pears_l = label_pearson(corr, p_value, y_axis, n=True)
print(start_name(cell_type_here, species) + ' amprange: ' + ' ' + 'fr_base' + ' to score' + pears_l)
##################################
print('\n')

Binary file not shown.

View File

@ -1,18 +1,21 @@
#from utils0import default_settings
#from plt_RAM import model_and_data_isi, model_cells
from plotstyle import plot_style
from threefish.utils0 import default_figsize, save_visualization
#from threefish.utils0 import default_settings, resave_small_files
#from plt_RAM import model_and_data, model_and_data_sheme, model_and_data_vertical2
# from threefish.utils0 import default_settings, resave_small_files
# from plt_RAM import model_and_data, model_and_data_sheme, model_and_data_vertical2
from threefish.plot_suscept import model_sheme_split2
# from threefish.utils0 import default_settings, resave_small_files
# from plt_RAM import model_and_data, model_and_data_sheme, model_and_data_vertical2
import matplotlib.gridspec as gridspec
# from threefish.utils0 import default_settings, resave_small_files
# from plt_RAM import model_and_data, model_and_data_sheme, model_and_data_vertical2
import matplotlib.gridspec as gridspec
from plotstyle import plot_style
from threefish.core_load import save_visualization
from threefish.plot_suscept import model_sheme_split2
from threefish.utils0 import default_figsize, save_visualization
from threefish.defaults import default_figsize
def flowchart():

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 109 KiB

View File

@ -7,18 +7,18 @@ from IPython import embed
from matplotlib import gridspec, pyplot as plt
from plotstyle import plot_style
from threefish.utils0 import default_settings, find_cell_add, get_flowchart_params, load_model_susept, \
nonlin_title, overlap_cells, \
perc_model_full, plot_lowpass2, plt_data_susept, plt_single_square_modl, plt_time_arrays, \
remove_xticks, \
remove_yticks, \
save_visualization, set_same_ylim
from threefish.core_calc_model import load_folder_name, resave_small_files
from threefish.core_plot_labels import noise_name
from threefish.core_plot_subplots import plot_lowpass2, plt_single_square_modl, plt_time_arrays
from threefish.core_plot_suscept import perc_model_full, plt_data_susept
from threefish.core_filenames import overlap_cells
from threefish.core_load import save_visualization
from threefish.core_reformat import get_flowchart_params, load_model_susept
from threefish.core_calc_model import resave_small_files
from threefish.core import find_folder_name
from threefish.core_plot_labels import label_noise_name, nonlin_title, remove_xticks, remove_yticks, set_xlabel_arrow, \
set_ylabel_arrow, title_find_cell_add, xlabel_xpos_y_modelanddata
import itertools as it
from threefish.utils0 import default_figsize
from threefish.utils1_suscept import xpos_y_modelanddata
from threefish.utils0 import join_x, join_y, set_clim_same, set_xlabel_arrow, set_ylabel_arrow
from threefish.defaults import default_figsize, default_settings
from threefish.core_plot_lims import join_x, join_y, set_clim_same, set_same_ylim
#from plt_RAM import model_and_data, model_and_data_sheme, model_and_data_vertical2
@ -35,22 +35,10 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
contrasts=[0], noises_added=[''], D_extraction_method=['additiv_cv_adapt_factor_scaled'],
internal_noise=['RAM'], external_noise=['RAM'], level_extraction=[''], receiver_contrast=[1],
dendrids=[''], ref_types=[''], adapt_types=[''], c_noises=[0.1], c_signal=[0.9], cut_offs1=[300]): # ['eRAM']
# plot_style()#['_RAMscaled']'_RAMscaled'
duration_noise = '_short',
formula = 'code' ##'formula'
# ,int(2 ** 16) int(2 ** 16), int(2 ** 15),
stimulus_length = 1 # 20#550 # 30 # 15#45#0.5#1.5 15 45 100
trials_nrs = [1] # [100, 500, 1000, 3000, 10000, 100000, 1000000] # 500
stimulus_type = '_StimulusOrig_' # ,#
# ,3]#, 3, 1, 1.5, 0.5, ] # ,1,1.5, 0.5] #[1,1.5, 0.5] # 1.5,0.5]3, 1,
variant = 'sinz'
mimick = 'no'
cell_recording_save_name = ''
trans = 1 # 5
rep = 1000000 # 500000#0
repeats = [20, rep] # 250000
aa = 0
good_data, remaining = overlap_cells()
cells_all = [good_data[0]]
@ -64,8 +52,7 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
mins = []
mats = []
ims = []
perc05 = []
perc95 = []
iternames = [D_extraction_method, external_noise,
internal_noise, powers, nffts, dendrids, cut_offs1, trials_nrs, c_signal,
c_noises,
@ -95,28 +82,16 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
grid_data = gridspec.GridSpecFromSubplotSpec(1, 1, grid[0, 0],
hspace=hs)
fr_print = False #True
#ypos_x_modelanddata()
fr_print = False
nr = 1
ax_data, stack_spikes_all, eod_frs = plt_data_susept(fig, grid_data, cells_all, cell_type='p-unit', width=width,
cbar_label=True, fr_print=fr_print,
eod_metrice=eod_metrice, nr=nr, amp_given=1, xlabel=False,
lp=lp, title=True)
for ax_external in ax_data:
# ax.set_ylabel(F2_xlabel())
# remove_xticks(ax)
ax_external.set_xticks_delta(100)
set_ylabel_arrow(ax_external, xpos=xpos_y_modelanddata(), ypos=0.87)
#embed()
set_ylabel_arrow(ax_external, xpos=xlabel_xpos_y_modelanddata(), ypos=0.87)
set_xlabel_arrow(ax_external, ypos=ypos_x_modelanddata())
# ax.text(-0.42, 0.87, F2_xlabel(), ha='center', va='center',
# transform=ax.transAxes, rotation = 90)
# ax.text(1.66, 0.5, nonlin_title(), rotation=90, ha='center', va='center',
# transform=ax.transAxes)
#ax_external.arrow_spines('lb')
#embed()
#plt.show()
@ -128,7 +103,7 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
cell = '2012-07-03-ak-invivo-1'
print('cell' + str(cell))
cells_given = [cell]
save_name_rev = load_folder_name(
save_name_rev = find_folder_name(
'calc_model') + '/' + 'calc_RAM_model-2__nfft_whole_power_1_RAM_additiv_cv_adapt_factor_scaled_cNoise_0.1_cSig_0.9_cutoff1_300_cutoff2_300no_sinz_length1_TrialsStim_' + str(
trial_nr) + '_a_fr_1__trans1s__TrialsNr_1_fft_o_forward_fft_i_forward_Hz_mV_revQuadrant_'
# for trial in trials:#.009
@ -164,7 +139,10 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
# Hier werde ich nun mit dem Fehler von 0.36 verfahren
# das bedeutet aber das sich den Stimulus zwar mit 0.009 ins Modell reintue später für die
# Susceptiblitätsberechnung sollte ich ihn aber um den Faktor 0.36 teilen
bias_factor = 0.36
# oben habe ich einen bias factor weil die Zelle zu sensitiv gefittet ist, also passe ich das an dass die den
# gleichen CV und feurrate hat, wie die Zelle in der Stimulation, deswegen ist dieser Bias faktor nur oben!
bias_factors = [0.36, 0.36, 1, 1]#0.36
save_names = [
'calc_RAM_model-2__nfft_whole_power_1_afe_0.009_RAM_cutoff1_300_cutoff2_300no_sinz_length1_TrialsStim_11_a_fr_1__trans1s__TrialsNr_1_fft_o_forward_fft_i_forward_Hz_mV',
'calc_RAM_model-2__nfft_whole_power_1_afe_0.009_RAM_cutoff1_300_cutoff2_300no_sinz_length1_TrialsStim_' + str(
@ -187,8 +165,8 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
c = 2.5
cs = ['$c=%.1f$' % c + '$\,\%$', '$c=0\,\%$']
titles = ['Model\n$N=11$', 'Model\n' + '$N=10^6$',
'Model\,(' + noise_name().lower() + ')' + '\n' + '$N=11$',
'Model\,(' + noise_name().lower() + ')' + '\n' + '$N=10^6$'
'Model\,(' + label_noise_name().lower() + ')' + '\n' + '$N=11$',
'Model\,(' + label_noise_name().lower() + ')' + '\n' + '$N=10^6$'
] #%#%s$' % (tr_name) + '\,million'
#'Model\,('+noise_name().lower()+')' + '\n' + '$N=11$\n $c=1\,\%$',$N=%s $' % (tr_name) +'\,million'
# 'Model\,('+noise_name().lower()+')' + '\n' + '$N=%s$' % (tr_name) + '\,million\n $c=1\,\%$ '
@ -202,28 +180,28 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
embed()
ax_model.append(ax_external)
save_name = load_folder_name('calc_model') + '/' + sav_name
save_name = find_folder_name('calc_model') + '/' + sav_name
cell_add, cells_save = find_cell_add(cells_given)
cell_add, cells_save = title_find_cell_add(cells_given)
perc = 'perc'
path = save_name + '.pkl' # '../'+
# stack = get_stack_one_quadrant(cell, cell_add, cells_save, path, save_name)
# model = get_stack_one_quadrant(cell, cell_add, cells_save, path, save_name)
# full_matrix = create_full_matrix2(np.array(stack), np.array(stack_rev))
# stack_final = get_axis_on_full_matrix(full_matrix, stack)
# im = plt_RAM_perc(ax, perc, np.abs(stack))
# full_matrix = create_full_matrix2(np.array(model), np.array(stack_rev))
# stack_final = get_axis_on_full_matrix(full_matrix, model)
# im = plt_RAM_perc(ax, perc, np.abs(model))
stack = load_model_susept(path, cells_save, save_name.split(r'/')[-1] + cell_add)
model = load_model_susept(path, cells_save, save_name.split(r'/')[-1] + cell_add)
#embed()
if len(stack) > 0:
add_nonlin_title, cbar, fig, stack_plot, im = plt_single_square_modl(ax_external, cell, stack, perc,
if len(model) > 0:
add_nonlin_title, cbar, fig, stack_plot, im = plt_single_square_modl(ax_external, cell, model, perc,
titles[s],
width, eod_metrice=eod_metrice,
titles_plot=True,
resize=True,
bias_factor=bias_factor,
bias_factor=bias_factors[s],
fr_print=fr_print, nr=nr)
# if s in [1,3,5]:
@ -242,7 +220,7 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
if s in np.arange(col - 1, 100, col): # | (s == 0)
remove_yticks(ax_external)
else:
set_ylabel_arrow(ax_external, xpos=xpos_y_modelanddata(), ypos=0.87)
set_ylabel_arrow(ax_external, xpos=xlabel_xpos_y_modelanddata(), ypos=0.87)
if s >= row * col - col:
set_xlabel_arrow(ax_external, ypos=ypos_x_modelanddata())
@ -258,6 +236,35 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
#################################################
# Flowcharts
ax_ams, ax_external = plt_model_flowcharts(a_fr, ax_external, c, cs, grid, model, stimulus_length)
set_same_ylim(ax_ams, up='up')
axes = np.concatenate([ax_data, ax_model])
axes = [ax_ams[0], axes[1], axes[2], ax_ams[1], axes[3], axes[4], ] #ax_ams[2], axes[5], axes[6],
#axd1 = plt.subplot(grid[1, 1])
#axd2 = plt.subplot(grid[2, 1])
#ax_data.extend([,])
#axd1.show_spines('')
#axd2.show_spines('')
#embed()
#axes = [[ax_ams[0],ax_data[0],axes[2], axes[3]],[ax_ams[1],axd1,axes[4], axes[5]],[axd2,axd2, axes[6], axes[7]]]
fig.tag([ax_data], xoffs=-3, yoffs=1.6) # ax_ams[3],
fig.tag([axes[0:3]], xoffs=-3, yoffs=1.6) # ax_ams[3],
#fig.tag([[axes[4]]], xoffs=-3, yoffs=1.6, minor_index=0) # ax_ams[3],
fig.tag([axes[3:6]], xoffs=-3, yoffs=1.6) #, major_index = 1, minor_index = 2 ax_ams[3],
#fig.tag([[axes[7]]], xoffs=-3, yoffs=1.6, major_index=2,minor_index=0) # ax_ams[3],
#fig.tag([axes[8::]], xoffs=-3, yoffs=1.6, major_index=2, minor_index=2) # ax_ams[3],
#fig.tag([axes[7::]], xoffs=-3, yoffs=1.6) # ax_ams[3],
#fig.tag([ax_ams[0],ax_data[0],axes[2], axes[3]], xoffs=-3, yoffs=1.6)#ax_ams[3],
save_visualization(pdf=True)
def plt_model_flowcharts(a_fr, ax_external, c, cs, grid, stack, stimulus_length):
var_types = ['', 'additiv_cv_adapt_factor_scaled'] # 'additiv_cv_adapt_factor_scaled',
##additiv_cv_adapt_factor_scaled
a_fes = [c / 100, 0] # , 0.009
@ -367,7 +374,7 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
remove_yticks(ax_n)
if g == 1:
# ax_n.set_xlabel('Time [ms]', labelpad=-0.5)
ax_n.text(0.5, xpos_y_modelanddata()*3, 'Time [ms]', transform = ax_n.transAxes, ha = 'center')
ax_n.text(0.5, xlabel_xpos_y_modelanddata() * 3, 'Time [ms]', transform=ax_n.transAxes, ha='center')
else:
remove_xticks(ax_n)
ax_n.set_ylim(ylim)
@ -393,30 +400,7 @@ def model_and_data2(eod_metrice=False, width=0.005, nffts=['whole'], powers=[1],
ax_n.tick_params(axis='y', which='major', labelsize=8.4)
# xtick_labelsize =
# embed()
set_same_ylim(ax_ams, up='up')
axes = np.concatenate([ax_data, ax_model])
axes = [ax_ams[0], axes[1], axes[2], ax_ams[1], axes[3], axes[4], ] #ax_ams[2], axes[5], axes[6],
#axd1 = plt.subplot(grid[1, 1])
#axd2 = plt.subplot(grid[2, 1])
#ax_data.extend([,])
#axd1.show_spines('')
#axd2.show_spines('')
#embed()
#axes = [[ax_ams[0],ax_data[0],axes[2], axes[3]],[ax_ams[1],axd1,axes[4], axes[5]],[axd2,axd2, axes[6], axes[7]]]
fig.tag([ax_data], xoffs=-3, yoffs=1.6) # ax_ams[3],
fig.tag([axes[0:3]], xoffs=-3, yoffs=1.6) # ax_ams[3],
#fig.tag([[axes[4]]], xoffs=-3, yoffs=1.6, minor_index=0) # ax_ams[3],
fig.tag([axes[3:6]], xoffs=-3, yoffs=1.6) #, major_index = 1, minor_index = 2 ax_ams[3],
#fig.tag([[axes[7]]], xoffs=-3, yoffs=1.6, major_index=2,minor_index=0) # ax_ams[3],
#fig.tag([axes[8::]], xoffs=-3, yoffs=1.6, major_index=2, minor_index=2) # ax_ams[3],
#fig.tag([axes[7::]], xoffs=-3, yoffs=1.6) # ax_ams[3],
#fig.tag([ax_ams[0],ax_data[0],axes[2], axes[3]], xoffs=-3, yoffs=1.6)#ax_ams[3],
save_visualization(pdf=True)
return ax_ams, ax_external
def start_pos_modeldata():

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 83 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,14 +1,17 @@
##from update_project import **
import numpy as np
from threefish.utils0 import chose_mat_max_value, cr_spikes_mat, default_figsize, find_all_dir_cells, \
plot_arrays_ROC_psd_single3, plot_shemes4, plt_coherences, save_visualization
from threefish.core_calc_model import find_code_vs_not
from threefish.core_cell_choice import find_all_dir_cells
from threefish.core_reformat import chose_mat_max_value, load_b_public
from threefish.core_plot_suscept import plt_coherences
from threefish.defaults import default_figsize
from threefish.core_time import cr_spikes_mat
from threefish.core import find_code_vs_not
import time
from threefish.utils1_suscept import check_var_substract_method, chose_certain_group, circle_plot, colors_suscept_paper_dots, \
extract_waves, load_cells_three, predefine_grouping_frame, restrict_cell_type, save_arrays_susept, title_motivation, \
ws_nonlin_systems
from threefish.utils0 import load_b_public
from threefish.utils1_suscept import check_var_substract_method, chose_certain_group, circle_plot, extract_waves, load_cells_three, predefine_grouping_frame, restrict_cell_type, save_arrays_susept, ws_nonlin_systems
from threefish.core_plot_labels import title_motivation
from threefish.core_plot_subplots import colors_suscept_paper_dots, plot_arrays_ROC_psd_single3, plot_shemes4
from threefish.core_load import save_visualization
#from matplotlib import gridspec as gridspec, gridspec, mlab as ml, pyplot as plt, ticker as ticker
from matplotlib import pyplot as plt

Binary file not shown.

View File

@ -4,10 +4,13 @@ import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from plotstyle import plot_style
from threefish.utils0 import default_figsize, default_settings, find_cell_add, get_stack, load_model_susept, \
overlap_cells, \
save_visualization # utils0_project
from threefish.core_calc_model import load_folder_name, resave_small_files
from threefish.core_plot_labels import title_find_cell_add
from threefish.defaults import default_figsize, default_settings
from threefish.core_filenames import overlap_cells
from threefish.core_load import save_visualization
from threefish.core_reformat import get_stack, load_model_susept
from threefish.core_calc_model import resave_small_files
from threefish.core import find_folder_name
from threefish.utils1_suscept import trial_nrs_ram_model
import itertools as it
@ -89,7 +92,7 @@ def trialnr(nffts=['whole'], powers=[1], contrasts=[0], noises_added=[''], D_ext
cell = '2012-07-03-ak-invivo-1'
print('cell'+str(cell))
cells_given = [cell]
save_name_rev = load_folder_name(
save_name_rev = find_folder_name(
'calc_model') + '/' + 'calc_RAM_model-2__nfft_whole_power_1_RAM_additiv_cv_adapt_factor_scaled_cNoise_0.1_cSig_0.9_cutoff1_300_cutoff2_300no_sinz_length1_TrialsStim_' + str(
trial_nr) + '_a_fr_1__trans1s__TrialsNr_1_fft_o_forward_fft_i_forward_Hz_mV_revQuadrant_'
# for trial in trials:#.009
@ -121,9 +124,9 @@ def trialnr(nffts=['whole'], powers=[1], contrasts=[0], noises_added=[''], D_ext
for s, sav_name in enumerate(save_names):
save_name = load_folder_name('calc_model') + '/' + sav_name
save_name = find_folder_name('calc_model') + '/' + sav_name
cell_add, cells_save = find_cell_add(cells_given)
cell_add, cells_save = title_find_cell_add(cells_given)
perc = 'perc'
path = save_name + '.pkl' # '../'+

View File

@ -130,9 +130,9 @@ if cont_other_dir == False:
embed()
#print(new_dir+dir)
#try:
shutil.copy2("../suseptibility/" + dir, new_dir + directory)
shutil.copy2("../suseptibility/" + directory,new_dir + directory)
#print(new_dir + directory)
#shutil.copy("../suseptibility/" + dir, new_dir + directory)
#shutil.copy("../suseptibility/" + directory,new_dir + directory)
#shutil.copyfile("../suseptibility/"+dir, new_dir+dir)
#except:
# print('shutil stuff')