update
This commit is contained in:
@ -6,11 +6,12 @@ import pickle
|
||||
import yaml
|
||||
|
||||
|
||||
#import matplotlib.font_manager
|
||||
from matplotlib import rc
|
||||
rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
|
||||
rc('text', usetex=True)
|
||||
|
||||
import matplotlib.font_manager
|
||||
|
||||
|
||||
def is_ipython():
|
||||
''' Check if script is run in IPython.
|
||||
@ -98,10 +99,10 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
ids.append(bnd_c['id'])
|
||||
ids_type.append('windkessel')
|
||||
current_val.append(bnd_set['parameters']['R_d'])
|
||||
labels.append('$R_' + str(bnd_c['id']))
|
||||
labels.append('$R_' + str(bnd_c['id']-3))
|
||||
if RC_flag:
|
||||
current_val_C.append(bnd_set['parameters']['C'])
|
||||
labels.append('$C_' + str(bnd_c['id']))
|
||||
labels.append('$C_' + str(bnd_c['id']-3))
|
||||
|
||||
|
||||
elif 'dirichlet' in bnd_c['type']:
|
||||
@ -112,10 +113,9 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
|
||||
|
||||
|
||||
|
||||
fig1, axes1 = plt.subplots(1,1,figsize=(12,6))
|
||||
fig1, axes1 = plt.subplots(1,1,figsize=(12,7))
|
||||
if RC_flag:
|
||||
fig2, axes2 = plt.subplots(1,1,figsize=(12,6))
|
||||
fig2, axes2 = plt.subplots(1,1,figsize=(12,7))
|
||||
|
||||
|
||||
t = dat['times']
|
||||
@ -162,13 +162,22 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
|
||||
|
||||
if ids_type[i] == 'dirichlet':
|
||||
pass
|
||||
#axes3.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$')
|
||||
#axes3.fill_between(t, curve - np.sqrt(P[:, idx, idx]), curve + np.sqrt(P[:, idx, idx]), alpha=0.3, color=col_)
|
||||
#legends_=next(legends)
|
||||
#axes3.plot(t, dash_curve , color=col_,ls='--')
|
||||
fig3, axes3 = plt.subplots(1,1,figsize=(12,5))
|
||||
axes3.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$', linewidth = 4)
|
||||
axes3.fill_between(t, std_down, std_up, alpha=0.3, color=col_)
|
||||
legends_=next(legends)
|
||||
axes3.plot(t, dash_curve , color=col_,ls='--')
|
||||
axes3.set_ylabel(r'$U$',fontsize=36)
|
||||
axes3.legend(fontsize=36,loc='upper right')
|
||||
axes3.set_xlim([-0.01,0.81])
|
||||
axes3.set_xlabel(r'$t (s)$',fontsize=36)
|
||||
axes3.set_box_aspect(1/4)
|
||||
plt.xticks(fontsize=28)
|
||||
plt.yticks(fontsize=28)
|
||||
plt.savefig('U.png')
|
||||
plt.close(fig3)
|
||||
else:
|
||||
axes1.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$', linewidth = 2)
|
||||
axes1.plot(t, curve , '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$', linewidth = 3)
|
||||
axes1.fill_between(t, std_down, std_up, alpha=0.3, color=col_)
|
||||
axes1.plot(t, dash_curve , color=col_,ls='--')
|
||||
legends_=next(legends)
|
||||
@ -199,19 +208,23 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
idx +=1
|
||||
|
||||
|
||||
axes1.set_ylabel(r'$R_d$',fontsize=22)
|
||||
axes1.legend(fontsize=18,loc='upper right')
|
||||
axes1.set_ylabel(r'$R_d$',fontsize=36)
|
||||
axes1.legend(fontsize=36,loc='upper right')
|
||||
axes1.set_xlim([-0.01,0.81])
|
||||
axes1.set_ylim([1700,35000])
|
||||
axes1.set_xlabel(r'$t (s)$',fontsize=22)
|
||||
plt.savefig('C.png')
|
||||
axes1.set_ylim([1700,45000])
|
||||
axes1.set_box_aspect(1/2)
|
||||
plt.xticks(fontsize=28)
|
||||
plt.yticks(fontsize=28)
|
||||
axes1.set_xlabel(r'$t (s)$',fontsize=36)
|
||||
plt.savefig('Rd.png')
|
||||
|
||||
|
||||
if RC_flag:
|
||||
|
||||
axes2.set_ylabel(r'$C$',fontsize=22)
|
||||
axes2.set_ylabel(r'$C$',fontsize=24)
|
||||
axes2.legend(fontsize=18,loc='upper right')
|
||||
axes2.set_xlim([-0.01,0.81])
|
||||
axes2.set_xlabel(r'$t (s)$',fontsize=22)
|
||||
axes2.set_xlabel(r'$t (s)$',fontsize=24)
|
||||
fig2.savefig('C.png')
|
||||
|
||||
fig1.savefig('Rd.png')
|
||||
|
@ -8,7 +8,7 @@ fluid:
|
||||
implicit_windkessel: True
|
||||
|
||||
io:
|
||||
write_path: 'results/aorta'
|
||||
write_path: 'results/HRz_Pb_V70'
|
||||
restart:
|
||||
path: '' # './projects/nse_coa3d/results/test_restart2/'
|
||||
time: 0
|
||||
@ -186,18 +186,18 @@ estimation:
|
||||
mesh: '/home/yeye/NuMRI/kalman/meshes/coaortaH3_leo2.0.h5'
|
||||
#mesh: './meshes/coaortaH1.h5'
|
||||
fe_degree: 1
|
||||
#xdmf_file: 'measurements/aorta_zdir/Perturbation/Mg15V120/u_all.xdmf'
|
||||
#file_root: 'measurements/aorta_zdir/Perturbation/Mg15V120/u{i}.h5'
|
||||
xdmf_file: 'measurements/aorta/u_all.xdmf'
|
||||
file_root: 'measurements/aorta/u{i}.h5'
|
||||
xdmf_file: 'measurements/aorta_zdir/Perturbation/Mg15V70/u_all.xdmf'
|
||||
file_root: 'measurements/aorta_zdir/Perturbation/Mg15V70/u{i}.h5'
|
||||
#xdmf_file: 'measurements/aorta/u_all.xdmf'
|
||||
#file_root: 'measurements/aorta/u{i}.h5'
|
||||
indices: 0 # indices of checkpoints to be processed. 0 == all
|
||||
velocity_direction: ~
|
||||
noise_stddev: 0 # standard deviation of Gaussian noise
|
||||
noise_stddev: 45 # standard deviation of Gaussian noise
|
||||
|
||||
roukf:
|
||||
particles: 'simplex' # unique or simplex
|
||||
observation_operator: 'postprocessing' #state or postprocessing
|
||||
reparameterize: True
|
||||
ODV_functional:
|
||||
enable: False
|
||||
VENC: 244
|
||||
enable: True
|
||||
VENC: 142
|
Reference in New Issue
Block a user