plot_flight_borders: add flags for flexibility. tm_wheel_parser.py: plot data distribution
This commit is contained in:
14
bin/asotr.py
14
bin/asotr.py
@@ -445,7 +445,7 @@ def cut_norm_data(data, time_begin, duration_sec, channel='ch1',
|
||||
|
||||
orig_data = pd.DataFrame({ 'timestamp': time_l, 'temp': temp_l })
|
||||
interp_data = orig_data.set_index('timestamp')
|
||||
interp_data = interp_data.resample('S').mean().interpolate(method=interp["method"],
|
||||
interp_data = interp_data.resample('s').mean().interpolate(method=interp["method"],
|
||||
order=interp["order"])
|
||||
interp_data = interp_data.reset_index(names=['timestamp'])
|
||||
|
||||
@@ -498,7 +498,7 @@ def plot_step_response_in_thermocycle(data_info, thermocycle_info, interp,
|
||||
data_info['data'], thermocycle_info, channel=data_info['channel'],
|
||||
interp=interp, accuracy=data_info['find_accuracy'])
|
||||
|
||||
fig = plt.figure(figsize=(9, 6), dpi=200)
|
||||
fig = plt.figure(figsize=(8, 7), dpi=200)
|
||||
fig.suptitle(title, fontsize=plot_info['font'])
|
||||
ax1 = fig.add_subplot(2,1,1)
|
||||
ax2 = fig.add_subplot(2,1,2)
|
||||
@@ -510,6 +510,10 @@ def plot_step_response_in_thermocycle(data_info, thermocycle_info, interp,
|
||||
|
||||
idx = find_best_time_idx(step_interp_cycle.timestamp, step_begin,
|
||||
accuracy=data_info['find_accuracy'])
|
||||
if idx == -1:
|
||||
print(f'index corresponding to time {step_begin} in times array not found!')
|
||||
return
|
||||
|
||||
ax1.axvline(x = step_interp_cycle.timestamp[idx], color='r', linestyle='-.',
|
||||
label= thermocycle_info['type_ru'] + ' воздействие, начало')
|
||||
|
||||
@@ -531,8 +535,8 @@ def plot_step_response_in_thermocycle(data_info, thermocycle_info, interp,
|
||||
fancybox=True, framealpha=0.4)
|
||||
ax2.grid(True)
|
||||
ax2.tick_params(axis='both', width=1, labelsize=plot_info['font'])
|
||||
ax2.set_xlabel('Время, ЧЧ:MM:CC', fontsize=plot_info['font'])
|
||||
ax2.set_ylabel(r'$T_{norm}$, $^\circ$C', fontsize=plot_info['font'])
|
||||
ax2.set_xlabel('Время, ЧЧ:MM', fontsize=plot_info['font'])
|
||||
ax2.set_ylabel(r'$T_{норм}$, $^\circ$C', fontsize=plot_info['font'])
|
||||
|
||||
fig.suptitle(title, fontsize=plot_info['font'])
|
||||
plt.tight_layout()
|
||||
@@ -555,7 +559,7 @@ def plot_imp_response(data, data_info, plot_info, thermocycle_info):
|
||||
ax1.grid(True)
|
||||
ax1.tick_params(axis='both', width=1, labelsize=plot_info['font'])
|
||||
ax1.set_xlabel('время', fontsize=plot_info['font'])
|
||||
ax1.set_ylabel(r'$t_{norm}$, $^\circ$C', fontsize=plot_info['font'])
|
||||
ax1.set_ylabel(r'$t_{норм}$, $^\circ$C', fontsize=plot_info['font'])
|
||||
|
||||
fig.suptitle(title, fontsize=plot_info['font'])
|
||||
plt.tight_layout()
|
||||
|
Reference in New Issue
Block a user