1. modify asotr_csv parser: ASOTR csv files are being supplemented if new data appears. 2. Fix bug in MUP command data parser - now all commands in MUP are decoded.
This commit is contained in:
@@ -14,6 +14,9 @@ asotr_kit = 1
|
||||
fname = f'../data/asotr/asotr0{asotr_kit}_data_T.csv'
|
||||
data = pd.read_csv(fname, sep=';', parse_dates=["timestamp"], date_format="%d.%m.%Y %H:%M:%S.%f")
|
||||
|
||||
# fname = f'../../python_cyclo/data/asotr0{asotr_kit}_data_T.csv'
|
||||
# data = pd.read_csv(fname, sep=';', parse_dates=["timestamp"], date_format="%d.%m.%Y %H:%M:%S.%f")
|
||||
|
||||
# date = '20.03.2025'
|
||||
# period = '1 мин'
|
||||
# time_begin_orig = date + ' 17:10:11'
|
||||
@@ -45,42 +48,6 @@ data = pd.read_csv(fname, sep=';', parse_dates=["timestamp"], date_format="%d.%m
|
||||
# name_fig = 'step_response_KDI_20242403.png'
|
||||
|
||||
|
||||
# interp = {'method': 'polynomial', 'order': 1}
|
||||
# thermocycle_info = {'date': '01.04.2025',
|
||||
# 'time_begin': ['01.04.2025 16:27:00', '01.04.2025 18:00:00'],
|
||||
# 'duration_sec': 92*60, 'type': 'step'}
|
||||
# cut_step_resp = {'time_step_begin': '01.04.2025 18:53:21', 'step_duration': 25*60}
|
||||
# data_info = {'data': data, 'device': 'KDI', 'channel': 'ch1', 'period': '1 мин',
|
||||
# 'find_accuracy': 'seconds'}
|
||||
# name = f'{thermocycle_info["type"]}_response_{data_info["device"]}_{thermocycle_info["date"].replace(".","")}'
|
||||
# plot_info = {'title': 'Реакция на ступенчатое воздействие',
|
||||
# 'ox_dtime_format': "%H:%M:%S", 'legend_pos': ['upper left', 'lower left'],
|
||||
# 'name_fig': f'{name}.png', 'font': 10}
|
||||
|
||||
|
||||
fname = f'../../python_cyclo/data/asotr0{asotr_kit}_data_T.csv'
|
||||
data = pd.read_csv(fname, sep=';', parse_dates=["timestamp"], date_format="%d.%m.%Y %H:%M:%S.%f")
|
||||
|
||||
interp = {'method': 'polynomial', 'order': 1}
|
||||
|
||||
data_info_list = []
|
||||
thermocycle_info_list = []
|
||||
cut_step_resp_list = []
|
||||
|
||||
data_info = {'data': data, 'device': 'КДИ', 'channel': 'ch1', 'period': '1 мин',
|
||||
'find_accuracy': 'seconds'}
|
||||
thermocycle_info = {'date': '01.04.2025',
|
||||
'time_begin': ['01.04.2025 16:27:13', '01.04.2025 18:00:18'],
|
||||
'duration_sec': 92*60, 'type': 'step', 'type_ru': 'ступенчатое'}
|
||||
cut_step_resp = {'time_step_begin': '01.04.2025 18:53:20', 'step_duration': 25*60}
|
||||
|
||||
data_info_list.append(data_info)
|
||||
thermocycle_info_list.append(thermocycle_info)
|
||||
cut_step_resp_list.append(cut_step_resp)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# interp = {'method': 'polynomial', 'order': 1}
|
||||
|
||||
@@ -88,17 +55,36 @@ cut_step_resp_list.append(cut_step_resp)
|
||||
# thermocycle_info_list = []
|
||||
# cut_step_resp_list = []
|
||||
|
||||
# data_info = {'data': data, 'device': 'летный', 'channel': 'ch1', 'period': '1 мин',
|
||||
# data_info = {'data': data, 'device': 'КДИ', 'channel': 'ch1', 'period': '1 мин',
|
||||
# 'find_accuracy': 'seconds'}
|
||||
# thermocycle_info = {'date': '25.04.2025',
|
||||
# 'time_begin': ['24.04.2025 22:46:32', '25.04.2025 00:19:33'],
|
||||
# thermocycle_info = {'date': '01.04.2025',
|
||||
# 'time_begin': ['01.04.2025 16:27:13', '01.04.2025 18:00:18'],
|
||||
# 'duration_sec': 92*60, 'type': 'step', 'type_ru': 'ступенчатое'}
|
||||
# cut_step_resp = {'time_step_begin': '25.04.2025 01:18:01', 'step_duration': 30*60}
|
||||
# cut_step_resp = {'time_step_begin': '01.04.2025 18:53:20', 'step_duration': 25*60}
|
||||
|
||||
# data_info_list.append(data_info)
|
||||
# thermocycle_info_list.append(thermocycle_info)
|
||||
# cut_step_resp_list.append(cut_step_resp)
|
||||
|
||||
|
||||
|
||||
interp = {'method': 'polynomial', 'order': 1}
|
||||
|
||||
data_info_list = []
|
||||
thermocycle_info_list = []
|
||||
cut_step_resp_list = []
|
||||
|
||||
data_info = {'data': data, 'device': 'летный', 'channel': 'ch1', 'period': '1 мин',
|
||||
'find_accuracy': 'seconds'}
|
||||
thermocycle_info = {'date': '25.04.2025',
|
||||
'time_begin': ['24.04.2025 22:46:32', '25.04.2025 00:19:33'],
|
||||
'duration_sec': 92*60, 'type': 'step', 'type_ru': 'ступенчатое'}
|
||||
cut_step_resp = {'time_step_begin': '25.04.2025 01:18:01', 'step_duration': 30*60}
|
||||
|
||||
data_info_list.append(data_info)
|
||||
thermocycle_info_list.append(thermocycle_info)
|
||||
cut_step_resp_list.append(cut_step_resp)
|
||||
|
||||
# data_info = {'data': data, 'device': 'летный', 'channel': 'ch2', 'period': '1 мин',
|
||||
# 'find_accuracy': 'seconds'}
|
||||
# thermocycle_info = {'date': '25.04.2025',
|
||||
@@ -272,7 +258,7 @@ cut_step_resp_list.append(cut_step_resp)
|
||||
def get_step_response(data_info, thermocycle_info, cut_step_resp):
|
||||
name = f'{data_info["channel"]}_{thermocycle_info["type"]}_response_{data_info["device"]}_{thermocycle_info["date"].replace(".","")}'
|
||||
plot_info = {'title': 'Реакция на ' + thermocycle_info['type_ru'] + ' воздействие',
|
||||
'ox_dtime_format': "%H:%M", 'legend_pos': ['upper left', 'lower left'],
|
||||
'ox_dtime_format': "%H:%M:%S", 'legend_pos': ['upper left', 'lower left'],
|
||||
'name_fig': f'../plots/response/{name}.png', 'font': 10}
|
||||
|
||||
asotr.plot_step_response_in_thermocycle(data_info, thermocycle_info, interp,
|
||||
|
||||
Reference in New Issue
Block a user