|
9 | 9 |
|
10 | 10 | import pandas as pd |
11 | 11 | import numpy as np |
12 | | -from fdsplotlib import plot_to_fig |
| 12 | +from fdsplotlib import plot_to_fig, get_version_string |
13 | 13 | from matplotlib import pyplot as plt |
14 | 14 | import os |
15 | 15 |
|
|
47 | 47 | # Read CSVs and force numeric conversion |
48 | 48 | M_path = f"{expdir}{test[i]}_profile.csv" |
49 | 49 | S_path = f"{outdir}{test[i]}_line.csv" |
| 50 | + version_string = get_version_string(f"{outdir}{test[i]}_git.txt") |
50 | 51 |
|
51 | 52 | M = pd.read_csv(M_path, skiprows=2) |
52 | 53 | S = pd.read_csv(S_path, skiprows=2) |
|
74 | 75 | # Plot velocity |
75 | 76 | fig_u = plot_to_fig(x_data=M.iloc[:,1].values, y_data=M.iloc[:,0].values, figure_handle=None, marker_style='ko', |
76 | 77 | x_label='Velocity (m/s)', y_label='Height (m)', plot_title=f'{test[i]} Velocity', |
77 | | - x_min=0,x_max=15,y_min=0,y_max=30, data_label='Measured', legend_location='lower right') |
| 78 | + x_min=0,x_max=15,y_min=0,y_max=30, data_label='Measured', legend_location='lower right', |
| 79 | + revision_label=version_string) |
78 | 80 | plot_to_fig(x_data=u, y_data=z, figure_handle=fig_u, marker_style='k-', data_label='M-O Theory') |
79 | 81 | plot_to_fig(x_data=S.iloc[:,1].values, y_data=S.iloc[:,0].values, figure_handle=fig_u, marker_style='k--', data_label='Simulated') |
80 | 82 |
|
|
87 | 89 | x_max = col2_first_valid + 5 |
88 | 90 | fig_T = plot_to_fig(x_data=M.iloc[:,2].values, y_data=M.iloc[:,0].values, figure_handle=None, marker_style='ko', |
89 | 91 | x_label='Temperature (°C)', y_label='Height (m)', plot_title=f'{test[i]} Temperature', |
90 | | - x_min=x_min, x_max=x_max, y_min=0, y_max=30, data_label='Measured', legend_location='lower right') |
| 92 | + x_min=x_min, x_max=x_max, y_min=0, y_max=30, data_label='Measured', legend_location='lower right', |
| 93 | + revision_label=version_string) |
91 | 94 | plot_to_fig(x_data=T-273.15, y_data=z, figure_handle=fig_T, marker_style='k-', data_label='M-O Theory') |
92 | 95 | plot_to_fig(x_data=S.iloc[:,2].values, y_data=S.iloc[:,0].values, figure_handle=fig_T, marker_style='k--', data_label='Simulated') |
93 | 96 |
|
|
0 commit comments