From c76aa4d8ef50ea47ac53345286e22d9bf923dd0b Mon Sep 17 00:00:00 2001 From: Skudalen Date: Wed, 23 Jun 2021 14:37:17 +0200 Subject: [PATCH] test: test the loading function, not working --- Signal_prep.py | 4 ++-- Test_functions.py | 13 ++++--------- __pycache__/Handle_emg_data.cpython-38.pyc | Bin 1123 -> 2144 bytes __pycache__/Signal_prep.cpython-38.pyc | Bin 0 -> 5437 bytes 4 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 __pycache__/Signal_prep.cpython-38.pyc diff --git a/Signal_prep.py b/Signal_prep.py index 45e911b..8606d50 100644 --- a/Signal_prep.py +++ b/Signal_prep.py @@ -85,11 +85,11 @@ def load_user_emg_data(): # left variant proccessed here for round in range(4): for emg_nr in range(8): - csv_handler.store_df(left_list[subject_nr][round], emg_nr, 'left', subject_data_container_list[subject_nr]) + csv_handler.store_df(left_list[subject_nr][round], emg_nr+1, 'left', subject_data_container_list[subject_nr]) # right variant proccessed here for round in range(4): for emg_nr in range(8): - csv_handler.store_df(left_list[subject_nr][round], emg_nr, 'right', subject_data_container_list[subject_nr]) + csv_handler.store_df(left_list[subject_nr][round], emg_nr+1, 'right', subject_data_container_list[subject_nr]) return csv_handler.data_container_dict diff --git a/Test_functions.py b/Test_functions.py index 334364b..63f2cf8 100644 --- a/Test_functions.py +++ b/Test_functions.py @@ -1,5 +1,6 @@ from Handle_emg_data import CSV_handler import matplotlib.pyplot as plt +import Signal_prep def test_df_extraction(emg_nr): handler = CSV_handler() @@ -10,12 +11,6 @@ def test_df_extraction(emg_nr): return subject1_left_emg1, emg_nr - - -# running -handler = CSV_handler -df, emg_nr = test_df_extraction(1) -print(emg_nr) -emg_str = handler.get_emg_str(emg_nr) -lines = df.plot.line(x='timestamp', y=emg_str) -plt.show() \ No newline at end of file +test_dict = Signal_prep.load_user_emg_data() +subject2_container = test_dict[2] +print(subject2_container.data_dict['left'][1]) \ No newline at end of file diff --git a/__pycache__/Handle_emg_data.cpython-38.pyc b/__pycache__/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Q)1eR3Xm=>(XRai D8Op-> delta 616 zcmZ8eO=}cE5bdw&>D|pPn}~~GPDYdg(fk0BfCmv|5koG087Esk>##GsOHXSq5f8~9 zkp2UD5%Nboc++E_1W(@eDt3(;qYcwl)%EJVH{GAdU)1PeIP8{#L+kGEjgjbB z=Q&gsm0MGnXTrDJRxx=Sf z>c7$Juj~Nfo#V@xP5zxecVKyJ;03k#M~W$-q>|lfmT0*ymQb{IBlbeNj;~u+hutf5 ZhzoYk34^-ZtYGtbZSGN|MQ%km*iY;CgCzg} diff --git a/__pycache__/Signal_prep.cpython-38.pyc b/__pycache__/Signal_prep.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a13518d08e452f807f955ca1f9282e89e8a7e3e9 GIT binary patch literal 5437 zcmb_gOK;mo5GE-~mTg&nCXVeqoR?!IjwR|5$9bV>k~T%#Ac&hD1QaaeVPwVBqa+nH z#Vk-DMNc{O*i+FS`xE*fdh4a&wI~0DUfQ8ZF-wy&5=Ih8&VIA}X20QZx#W|nsR@C8 zf2{xY^)JhU@Q>Tze-br5pv@}L4g?Slp)U51QY%%LMHiEdbSqQOw8rXV)J}o?gHX?c zxFZzO2XvP3upl{;cXz&2_p~+`y6NQaX||^BcG|YqZ0qK(+iCE-Lxww~yR=z(3J)Tq z5KM#=lR#!E6i`G7Qw^EPkY;Jfundf`G03tkrZIzKm?hshjI#-tV3RP(a*$(FIDwOx z!zuFRVTw&dp3T5Cn}r!RhtoKNvp7e-d6;DjFvpI;JUb2xY!Mgm7#_z(@|}QVYzdCD zWmse@aDtu0C0xc8JW0M&u*6QoGCKn+Y!yzjvv?ZM;3}Ra-#IwN&ckVT0nV_Cu*%l( zJYK+yxJJH9aF(sZIaYx4>@r+nS8yE*cp0ydZv!r}tFXp4;SwvtIxFE-+{7Z5$fux; zc|3vVaHElCWgN$OJcXA~p;pBfSk)Gx0GD4$tk$=#kaewZZIHFqx2}?Py>D%jwT(5r zhFf?Yw~6D1EkW^>cu)B1M|P9!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