test: test the loading function, not working
This commit is contained in:
parent
d24699b8c1
commit
c76aa4d8ef
@ -85,11 +85,11 @@ def load_user_emg_data():
|
|||||||
# left variant proccessed here
|
# left variant proccessed here
|
||||||
for round in range(4):
|
for round in range(4):
|
||||||
for emg_nr in range(8):
|
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
|
# right variant proccessed here
|
||||||
for round in range(4):
|
for round in range(4):
|
||||||
for emg_nr in range(8):
|
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
|
return csv_handler.data_container_dict
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from Handle_emg_data import CSV_handler
|
from Handle_emg_data import CSV_handler
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
|
import Signal_prep
|
||||||
|
|
||||||
def test_df_extraction(emg_nr):
|
def test_df_extraction(emg_nr):
|
||||||
handler = CSV_handler()
|
handler = CSV_handler()
|
||||||
@ -10,12 +11,6 @@ def test_df_extraction(emg_nr):
|
|||||||
|
|
||||||
return subject1_left_emg1, emg_nr
|
return subject1_left_emg1, emg_nr
|
||||||
|
|
||||||
|
test_dict = Signal_prep.load_user_emg_data()
|
||||||
|
subject2_container = test_dict[2]
|
||||||
# running
|
print(subject2_container.data_dict['left'][1])
|
||||||
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()
|
|
Binary file not shown.
BIN
__pycache__/Signal_prep.cpython-38.pyc
Normal file
BIN
__pycache__/Signal_prep.cpython-38.pyc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user