Updated few parts of test_models.py file, renamed a variable from max to maxi as max is an inbuilt function name.

这个提交包含在:
Sai Suraj
2023-04-16 12:25:22 +05:30
父节点 e41449a923
当前提交 80db7bbe67
共有 2 个文件被更改,包括 48 次插入35 次删除

查看文件

@@ -81,8 +81,12 @@ realmax = np.where(np.abs(real[:, 1]) == 1)[0][0]
difftime = - (timemodel[modelmax] - real[realmax, 0])
# Plot modelled and real data
fig, ax = plt.subplots(num=modelfile.stem + '_vs_' + realfile.stem,
figsize=(20, 10), facecolor='w', edgecolor='w')
fig, ax = plt.subplots(
num=f'{modelfile.stem}_vs_{realfile.stem}',
figsize=(20, 10),
facecolor='w',
edgecolor='w',
)
ax.plot(timemodel + difftime, model, 'r', lw=2, label='Model')
ax.plot(real[:, 0], real[:, 1], 'r', ls='--', lw=2, label='Experiment')
ax.set_xlabel('Time [s]')
@@ -93,7 +97,7 @@ ax.legend()
ax.grid()
# Save a PDF/PNG of the figure
savename = modelfile.stem + '_vs_' + realfile.stem
savename = f'{modelfile.stem}_vs_{realfile.stem}'
savename = modelfile.parent / savename
# fig.savefig(savename.with_suffix('.pdf'), dpi=None, format='pdf',
# bbox_inches='tight', pad_inches=0.1)