ladbar machen

This commit is contained in:
saschuta 2024-06-14 12:12:47 +02:00
parent 3c96eaa9a3
commit 28b1d122c1
7 changed files with 68 additions and 12 deletions

View File

@ -1,10 +1,21 @@
import cProfile
import pstats
from IPython import embed
from threefish.RAM.reformat_cellchoice import p_units_to_show
from threefish.RAM.reformat_population import update_cell_names
from threefish.RAM.plots import ampullary_punit
if __name__ == '__main__':
''' #cells_plot2 = p_units_to_show(type_here='amp') # permuted = True,
cProfile.run('ampullary_punit(eod_metrice = False, base_extra = True,color_same = False, tags_individual = True, isi_delta = 5, titles=[''], RAM=False, add_texts = [0.25,1.3])', 'profiling_results')
p = pstats.Stats('profiling_results')
p.sort_stats('cumulative').print_stats(400)
p.sort_stats('tottime').print_stats(400)
embed()'''
test = False

43
data/csv_model_data.csv Normal file
View File

@ -0,0 +1,43 @@
,cv_model,cv_data,fr_model,fr_data,cell
0,0.6817438393691468,0.775348772871252,388.2,390.7721280602637,2011-10-25-ad-invivo-1
1,0.9508274735502914,0.8965052621271561,411.0,410.9397330196768,2012-04-20-ak-invivo-1
2,0.5062394529494908,0.638838178877662,196.3,196.1757132747204,2012-05-10-ad-invivo-1
3,0.4313155746954917,0.4234497042476461,138.1,137.66853751370877,2012-06-27-ah-invivo-1
4,0.2702557920562157,0.2838546105957824,95.8,93.17812014340711,2012-06-27-an-invivo-1
5,0.2018004189541085,0.2042869314174391,120.5,120.16822304668206,2012-07-03-ak-invivo-1
6,0.2714472771565104,0.267171156460565,104.4,104.22327693441058,2012-07-12-ag-invivo-1
7,0.464294520853177,0.4741584289508612,179.2,177.8483458675932,2012-07-12-ap-invivo-1
8,0.3129464568674385,0.2897538008699986,178.2,178.40404970636052,2012-12-13-af-invivo-1
9,0.476896604692532,0.5470582985053059,136.8,132.94146821454265,2012-12-13-ag-invivo-1
10,0.3058664738568734,0.2926742597182857,179.4,179.92489302376225,2012-12-13-ah-invivo-1
11,0.1146476609507728,0.197727202865953,145.4,144.01051894440496,2012-12-13-an-invivo-1
12,0.2420048399479115,0.1962198686538558,146.2,146.08206706437974,2012-12-13-ao-invivo-1
13,0.2339278724764407,0.2028659448806151,120.2,120.86322123297631,2012-12-20-aa-invivo-1
14,0.2830066432637453,0.3459463488040104,390.8,388.9157439018588,2012-12-20-ab-invivo-1
15,0.2609956708972076,0.229096249897458,211.9,213.06481685344093,2012-12-20-ac-invivo-1
16,0.3537774356443943,0.2930094883750296,305.3,304.5661250264298,2012-12-20-ad-invivo-1
17,0.394150320656889,0.3263595798725144,402.0,401.61430796972553,2012-12-20-ae-invivo-1
18,0.40250822576968,0.385670402282928,293.8,294.29171963373733,2012-12-21-ai-invivo-1
19,0.4135295455296104,1.3153672469723925,161.2,152.91772994060364,2012-12-21-ak-invivo-1
20,0.2125073528050415,0.2251006388180117,136.1,135.29671183456162,2012-12-21-am-invivo-1
21,0.3232549539769884,0.3142560483939225,201.5,201.58949049208883,2012-12-21-an-invivo-1
22,0.170057701085378,0.1540261843279488,132.0,132.0191373790424,2013-01-08-aa-invivo-1
23,0.8927904460579393,0.9593383347256976,332.4,334.82728186778024,2014-06-06-ac-invivo-1
24,0.7073114370674891,0.7694835270746943,122.8,117.4113188111938,2014-06-06-ag-invivo-1
25,0.4195091411614141,0.4935468906787454,108.5,105.98729355901548,2014-12-03-ai-invivo-1
26,0.6179630255905533,0.605908987582758,72.6,71.60510808987966,2014-12-11-aa-invivo-1
27,0.392706646583644,0.3951171756877243,49.9,50.7617424856317,2014-12-11-ad-invivo-1
28,0.6538937497490419,0.6882761062928278,118.2,112.59277896590766,2015-01-15-ab-invivo-1
29,0.3858892870142897,0.3849451280752879,85.5,84.44055741832175,2015-01-20-ac-invivo-1
30,0.637317804180754,0.6385355671740442,86.4,83.34522883100257,2015-01-20-ae-invivo-1
31,0.4052388391422138,0.4408835041637635,72.3,66.32129300260223,2015-01-20-af-invivo-1
32,0.5285779999909097,0.6851849246695342,136.3,133.52080193402858,2018-01-10-al
33,0.9381457826829724,1.0424908494691056,134.7,132.48933066922888,2018-05-08-aa-invivo-1
34,0.6746272792756959,0.646400619224395,115.8,112.20654330017982,2018-05-08-ab-invivo-1
35,0.5324513948224344,0.5421245958202553,103.0,99.33574283838944,2018-05-08-ac-invivo-1
36,0.6766755198990227,0.6698528425281729,228.3,225.782302546346,2018-05-08-ad-invivo-1
37,0.4831954817759857,0.4848061066637898,143.0,141.92425603570865,2018-05-08-ae-invivo-1
38,0.5098447003702683,0.513370493789267,315.4,315.8065989062944,2018-05-08-af-invivo-1
39,0.3364199123649802,0.3361128299571618,142.5,141.93386929706594,2018-05-08-ai-invivo-1
40,0.6712846024253576,0.6900755937314905,259.2,256.9962637292982,2018-06-25-ad-invivo-1
41,0.5786794657807612,0.6005965972662757,192.0,187.8406616747939,2018-06-26-ah-invivo-1
1 cv_model cv_data fr_model fr_data cell
2 0 0.6817438393691468 0.775348772871252 388.2 390.7721280602637 2011-10-25-ad-invivo-1
3 1 0.9508274735502914 0.8965052621271561 411.0 410.9397330196768 2012-04-20-ak-invivo-1
4 2 0.5062394529494908 0.638838178877662 196.3 196.1757132747204 2012-05-10-ad-invivo-1
5 3 0.4313155746954917 0.4234497042476461 138.1 137.66853751370877 2012-06-27-ah-invivo-1
6 4 0.2702557920562157 0.2838546105957824 95.8 93.17812014340711 2012-06-27-an-invivo-1
7 5 0.2018004189541085 0.2042869314174391 120.5 120.16822304668206 2012-07-03-ak-invivo-1
8 6 0.2714472771565104 0.267171156460565 104.4 104.22327693441058 2012-07-12-ag-invivo-1
9 7 0.464294520853177 0.4741584289508612 179.2 177.8483458675932 2012-07-12-ap-invivo-1
10 8 0.3129464568674385 0.2897538008699986 178.2 178.40404970636052 2012-12-13-af-invivo-1
11 9 0.476896604692532 0.5470582985053059 136.8 132.94146821454265 2012-12-13-ag-invivo-1
12 10 0.3058664738568734 0.2926742597182857 179.4 179.92489302376225 2012-12-13-ah-invivo-1
13 11 0.1146476609507728 0.197727202865953 145.4 144.01051894440496 2012-12-13-an-invivo-1
14 12 0.2420048399479115 0.1962198686538558 146.2 146.08206706437974 2012-12-13-ao-invivo-1
15 13 0.2339278724764407 0.2028659448806151 120.2 120.86322123297631 2012-12-20-aa-invivo-1
16 14 0.2830066432637453 0.3459463488040104 390.8 388.9157439018588 2012-12-20-ab-invivo-1
17 15 0.2609956708972076 0.229096249897458 211.9 213.06481685344093 2012-12-20-ac-invivo-1
18 16 0.3537774356443943 0.2930094883750296 305.3 304.5661250264298 2012-12-20-ad-invivo-1
19 17 0.394150320656889 0.3263595798725144 402.0 401.61430796972553 2012-12-20-ae-invivo-1
20 18 0.40250822576968 0.385670402282928 293.8 294.29171963373733 2012-12-21-ai-invivo-1
21 19 0.4135295455296104 1.3153672469723925 161.2 152.91772994060364 2012-12-21-ak-invivo-1
22 20 0.2125073528050415 0.2251006388180117 136.1 135.29671183456162 2012-12-21-am-invivo-1
23 21 0.3232549539769884 0.3142560483939225 201.5 201.58949049208883 2012-12-21-an-invivo-1
24 22 0.170057701085378 0.1540261843279488 132.0 132.0191373790424 2013-01-08-aa-invivo-1
25 23 0.8927904460579393 0.9593383347256976 332.4 334.82728186778024 2014-06-06-ac-invivo-1
26 24 0.7073114370674891 0.7694835270746943 122.8 117.4113188111938 2014-06-06-ag-invivo-1
27 25 0.4195091411614141 0.4935468906787454 108.5 105.98729355901548 2014-12-03-ai-invivo-1
28 26 0.6179630255905533 0.605908987582758 72.6 71.60510808987966 2014-12-11-aa-invivo-1
29 27 0.392706646583644 0.3951171756877243 49.9 50.7617424856317 2014-12-11-ad-invivo-1
30 28 0.6538937497490419 0.6882761062928278 118.2 112.59277896590766 2015-01-15-ab-invivo-1
31 29 0.3858892870142897 0.3849451280752879 85.5 84.44055741832175 2015-01-20-ac-invivo-1
32 30 0.637317804180754 0.6385355671740442 86.4 83.34522883100257 2015-01-20-ae-invivo-1
33 31 0.4052388391422138 0.4408835041637635 72.3 66.32129300260223 2015-01-20-af-invivo-1
34 32 0.5285779999909097 0.6851849246695342 136.3 133.52080193402858 2018-01-10-al
35 33 0.9381457826829724 1.0424908494691056 134.7 132.48933066922888 2018-05-08-aa-invivo-1
36 34 0.6746272792756959 0.646400619224395 115.8 112.20654330017982 2018-05-08-ab-invivo-1
37 35 0.5324513948224344 0.5421245958202553 103.0 99.33574283838944 2018-05-08-ac-invivo-1
38 36 0.6766755198990227 0.6698528425281729 228.3 225.782302546346 2018-05-08-ad-invivo-1
39 37 0.4831954817759857 0.4848061066637898 143.0 141.92425603570865 2018-05-08-ae-invivo-1
40 38 0.5098447003702683 0.513370493789267 315.4 315.8065989062944 2018-05-08-af-invivo-1
41 39 0.3364199123649802 0.3361128299571618 142.5 141.93386929706594 2018-05-08-ai-invivo-1
42 40 0.6712846024253576 0.6900755937314905 259.2 256.9962637292982 2018-06-25-ad-invivo-1
43 41 0.5786794657807612 0.6005965972662757 192.0 187.8406616747939 2018-06-26-ah-invivo-1

View File

@ -183,10 +183,10 @@ def motivation_all_small(dev_desired = '1', ylim=[-1.25, 1.25], c1=10, dfs=['m1'
####################################################
# hier checken wir ob für diesen einen Punkt das funkioniert mit der standardabweichung
try:
check_var_substract_method(spikes_pure)
except:
print('var checking not possible')
#try:
# check_var_substract_method(spikes_pure)
#except:
# print('var checking not possible')
# fig = plt.figure()
# grid = gridspec.GridSpec(2, 1, wspace=0.7, left=0.05, top=0.95, bottom=0.15,
# right=0.98)
@ -337,9 +337,11 @@ def motivation_all_small(dev_desired = '1', ylim=[-1.25, 1.25], c1=10, dfs=['m1'
group_mean[1].DF1) # data.eodf.iloc[0] + 50 # cell_model.eodj.iloc[0]
a_fj = group_mean[0][0] / 100
variant_cell = 'no' # 'receiver_emitter_jammer'
print('f0' + str(eod_fr))
print('f1'+str(eod_fe))
print('f2' + str(eod_fj))
printing = False
if printing:
print('f0' + str(eod_fr))
print('f1'+str(eod_fe))
print('f2' + str(eod_fj))
eod_fish_j, time_array, time_fish_r, eod_fish_r, time_fish_e, eod_fish_e, time_fish_sam, eod_fish_sam, stimulus_am, stimulus_sam = extract_waves(
variant_cell, '',
stimulus_length, deltat, eod_fr, a_fr, a_fe, [eod_fe], 0, eod_fj, a_fj)
@ -391,7 +393,7 @@ def motivation_all_small(dev_desired = '1', ylim=[-1.25, 1.25], c1=10, dfs=['m1'
ax.text(0, -0.16, '20 ms', va='center', fontsize=10,
transform=ax.transAxes)
printing = True
printing = False
if printing:
print(time.time() - t3)
@ -456,8 +458,7 @@ def motivation_all_small(dev_desired = '1', ylim=[-1.25, 1.25], c1=10, dfs=['m1'
individual_tag = 'DF1' + str(DF1_desired[gg]) + 'DF2' + str(
DF2_desired[gg]) + cell + '_c1_' + str(c1) + '_c2_' + str(c2) + mean_type
# save_all(individual_tag, show, counter_contrast=0, savename='')
# print('individual_tag')
axes = []
axes.append(ax_w)

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View File

@ -10,7 +10,7 @@ from plotstyle import plot_style
from threefish.calc_time import extract_am
from threefish.core import find_folder_name, find_project_data, info
from threefish.defaults import default_figsize, default_ticks_talks
from threefish.load import load_savedir, save_visualization
from threefish.load import load_savedir, resave_small_files, save_visualization
from threefish.plot.limits import join_x, join_y, set_same_ylim
from threefish.RAM.calc_fft import log_calc_psd
from threefish.RAM.calc_model import chose_old_vs_new_model
@ -70,7 +70,8 @@ def nonlin_regime(yposs=[450, 450, 450], printing=False, beat='',
########################################
# für das model_full, die Freuqnezen
DF1_frmult, DF2_frmult = vals_model_full(val=0.30833333333333335)
frame_cvs = pd.read_csv(find_folder_name('calc_base')+'/csv_model_data.csv')
frame_cvs = resave_small_files('csv_model_data.csv', load_folder = 'calc_base')
#frame_cvs = pd.read_csv(find_folder_name('calc_base')+'/csv_model_data.csv')
frame_cell = frame_cvs[frame_cvs.cell == '2012-07-03-ak-invivo-1']
#embed()
for d in range(len(DF1_frmult)):

BIN
profiling_results Normal file

Binary file not shown.