parm_format = '{:.2e}' # p_o2 and p_test over a range p_arr = np.empty([0, 2]) for po2 in np.linspace(0.05, 0.12, 5): for ptest in np.linspace(1E-7, 1E-6, 5): p_arr = np.append(p_arr, [[po2, ptest]], axis=0) #When T- is severely oxygen limited parm_name = 'p_o2-p_test' parm_name_array = ['p_o2', 'p_test'] post_path = 'Tneg-o2limited_' cf.timeseries(pre_path=pre_path, parm_name=parm_name, parm_array=p_arr, parm_format=parm_format, plot_Tpos=False, post_path=post_path) df = cf.eq_values(pre_path=pre_path, parm_name=parm_name, parm_array=p_arr, parm_format=parm_format, parm_name_array=parm_name_array, post_path=post_path) df = cf.cell_eq_ratio(df, 'Tneg', 'Tpro') cf.plot_2parm(df=df, pre_path=pre_path, parm_name=parm_name, post_path=post_path, pri_parm=parm_name_array[0], sec_parm=parm_name_array[1],
for ulim in np.arange(llim + 0.1, 1, 0.2): o2_lim_arr = np.append(o2_lim_arr, [[llim, ulim]], axis=0) parm_format = '{:.1f}' # T- parm_name = 'l_lim_o2Tneg-u_lim_o2Tneg' parm_name_array = np.array(['l_lim_o2Tneg', 'u_lim_o2Tneg']) ## OG Equation pre_path = 'EnvEq/singlecelltype/Tneg/' cf.mkdirs(pre_path=pre_path, parm_name=parm_name) ### celleq=1E4: rho s.t T- at equilibrium is 10^4 cf.timeseries(pre_path=pre_path, parm_name=parm_name, parm_array=o2_lim_arr, parm_format=parm_format, plot_Tpos=False, plot_Tpro=False, plot_test=False) df = cf.eq_values(pre_path=pre_path, parm_name=parm_name, parm_array=o2_lim_arr, parm_format=parm_format, parm_name_array=parm_name_array) df['l_lim_o2Tneg'] = df['l_lim_o2Tneg'].round(1) df['u_lim_o2Tneg'] = df['u_lim_o2Tneg'].round(1) cf.heatmap_eqvparm(df, pre_path=pre_path, parm_name=parm_name, parm_name_array=parm_name_array, plot_Tpos=False,
'timescaled_tauconst-', ### Tp:T+:T- 1:1:1 x 666 (total ~2000) with delta scaled by 10^-2, tau fixed 'timescaled_tauconst-0.8Tp-', ### Tp:T+:T- 8:1:1 x 200 (total 2000) with delta scaled by 10^-2, tau fixed 'nonT_neg-timescaled_tauconst-0.8Tp-', ### Tp:T+:T- 8:1:1 x 200 (total 2000) with delta scaled by 10^-2, tau fixed but therapy only works with T+ and Tp numbers 'cunningham-', ### Tp:T+:T- 1:1:1 x 666 (total ~2000) with doubling times from Cunningham et al for check '0.8Tp-cunningham-', ### Tp:T+:T- 8:1:1 x 200 (total 2000) with doubling times from Cunningham et al for chec 'nonT_neg-cunningham-', ### Tp:T+:T- 1:1:1 x 666 (total ~2000) with doubling times from Cunningham et al for check but therapy only works with T+ and Tp numbers 'nonT_neg-0.8Tp-cunningham-' ### Tp:T+:T- 8:1:1 x 200 (total 2000) with doubling times from Cunningham et al for check but therapy only works with T+ and Tp numbers ]) ### for scenario in scenarios: for p_min in p_min_arr: post_path = scenario + 'p={:.1e}-'.format(p_min) cf.timeseries(pre_path=pre_path, parm_name=parm_name, parm_array=parms_array, parm_format=parm_format, post_path=post_path, plot_tot=True) df = cf.eq_values(pre_path=pre_path, parm_name=parm_name, parm_array=parms_array, parm_format=parm_format, post_path=post_path, ttp=True, limit=9000) ## High o2 efficiency, High test efficiency parm_name = 'o2-HE_test-HE' cf.mkdirs(pre_path=pre_path, parm_name=parm_name) scenarios = np.array([ '', ### Tp:T+:T- 1:1:1 x 666 (total ~2000)
import common_fn as cf import seaborn as sns import os plt.rcParams["svg.hashsalt"]=0 # O2 efficiency ## Tp:T+:T- 1:1:1 x 666 (total ~2000) ### High test efficiency pre_path='EnvEq/All3/' parm_format='{}' parm_name='o2-efficiency' cf.mkdirs(pre_path=pre_path,parm_name=parm_name) cases=pd.read_csv('../input/EnvEq/All3/o2-efficiency/All3_o2-eff_cases.csv') parms_array='Case'+cases.Case cf.timeseries(pre_path=pre_path,parm_name=parm_name,parm_array=parms_array,parm_format=parm_format) df=cf.eq_values(pre_path=pre_path,parm_name=parm_name,parm_array=parms_array,parm_format=parm_format) ## Tp:T+:T- 1:8:1 x 200 (total 2000) post_path='0.8Tp-' cf.timeseries(pre_path=pre_path,parm_name=parm_name,parm_array=parms_array,parm_format=parm_format,post_path=post_path) df=cf.eq_values(pre_path=pre_path,parm_name=parm_name,parm_array=parms_array,parm_format=parm_format,post_path=post_path) # test efficiency parm_name='test-efficiency' cf.mkdirs(pre_path=pre_path,parm_name=parm_name) ## Tp:T+:T- 1:1:1 x 666 (total ~2000) ### Null o2 efficiency cases=pd.read_csv('../input/EnvEq/All3/test-efficiency/All3_test-eff_cases.csv')