2021-06-23 08:14:07 +00:00
|
|
|
from Handle_emg_data import CSV_handler
|
2021-06-23 09:01:02 +00:00
|
|
|
import matplotlib.pyplot as plt
|
2021-06-22 19:30:55 +00:00
|
|
|
|
2021-06-23 09:01:02 +00:00
|
|
|
def test_df_extraction(emg_nr):
|
2021-06-22 19:30:55 +00:00
|
|
|
handler = CSV_handler()
|
|
|
|
|
2021-06-23 09:01:02 +00:00
|
|
|
file = "/Exp20201205_2myo_hardTypePP/HaluskaMarek_20201207_1810/myoLeftEmg.csv"
|
|
|
|
subject1_left_emg1 = handler.get_time_emg_table(file, emg_nr)
|
|
|
|
print(subject1_left_emg1.head)
|
2021-06-22 19:30:55 +00:00
|
|
|
|
2021-06-23 09:01:02 +00:00
|
|
|
return subject1_left_emg1, emg_nr
|
2021-06-22 19:30:55 +00:00
|
|
|
|
2021-06-23 09:01:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
# 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()
|