clean up
This commit is contained in:
@ -52,15 +52,41 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
inputfile = yaml.full_load(file)
|
||||
|
||||
|
||||
true_values = {
|
||||
3: 2400,
|
||||
4: 4200,
|
||||
5: 11000,
|
||||
6: 7800,
|
||||
2: 100
|
||||
}
|
||||
#true_values = {
|
||||
# 3: 3400,
|
||||
# 4: 4200,
|
||||
# 5: 11000,
|
||||
# 6: 7800,
|
||||
# 2: 100
|
||||
# }
|
||||
|
||||
|
||||
true_values = {
|
||||
3: 4800,
|
||||
4: 7020,
|
||||
5: 11520,
|
||||
6: 11520,
|
||||
2: 75
|
||||
}
|
||||
|
||||
|
||||
|
||||
true_values_c = {
|
||||
3: 0.0008,
|
||||
4: 0.00034,
|
||||
5: 0.00034,
|
||||
6: 0.00034,
|
||||
2: 100
|
||||
}
|
||||
|
||||
true_values_rp = {
|
||||
3: 10,
|
||||
4: 60,
|
||||
5: 220,
|
||||
6: 160,
|
||||
2: 100
|
||||
}
|
||||
|
||||
|
||||
current_val = []
|
||||
labels = []
|
||||
ids = []
|
||||
@ -75,10 +101,9 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
labels.append('$R_' + str(bnd_c['id']))
|
||||
|
||||
elif 'dirichlet' in bnd_c['type']:
|
||||
current_val.append(inputfile['boundary_conditions'][1]['parameters']['U'])
|
||||
current_val.append(inputfile['boundary_conditions'][0]['parameters']['U'])
|
||||
ids.append(bnd_c['id'])
|
||||
labels.append('U')
|
||||
|
||||
labels.append('$U')
|
||||
|
||||
dim = dat['theta'].shape[-1]
|
||||
fig1, axes = plt.subplots(1,1,figsize=(8,6))
|
||||
@ -107,10 +132,10 @@ def plot_parameters(dat, input_file, deparameterize=False, ref=None):
|
||||
for i in range(dim):
|
||||
|
||||
true_level = np.log(true_values[ids[i]]/current_val[i])/np.log(2)
|
||||
rec_value = np.round(2**theta[-1, i]*current_val[i],1)
|
||||
rec_value = np.round(2**theta[-1, i]*current_val[i],2)
|
||||
cur_key = ids[i]
|
||||
|
||||
axes.plot(t, theta[:, i] + 1.5*i, '-', color=col_,label=legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$')
|
||||
axes.plot(t, theta[:, i] + 1.5*i, '-', color=col_,label= legends_ + '= ' + str(rec_value) + '/' + str(true_values[cur_key]) + '$')
|
||||
axes.fill_between(t, theta[:, i] + 1.5*i - np.sqrt(P[:, i, i]),
|
||||
theta[:, i] + 1.5*i + np.sqrt(P[:, i, i]), alpha=0.3,
|
||||
color=col_)
|
||||
|
Reference in New Issue
Block a user