chore: moved presenting functions to Present_data.py

This commit is contained in:
Skudalen 2021-06-25 16:09:51 +02:00
parent ed35db265a
commit 95dc84d6e5
3 changed files with 29 additions and 14 deletions

View File

@ -0,0 +1,26 @@
from Handle_emg_data import *
from Signal_prep import *
# PLOT FUNCTIONS:
# Plots DataFrame objects
def plot_df(df:DataFrame):
lines = df.plot.line(x='timestamp')
plt.show()
# Plots ndarrays after transformations
def plot_arrays(N, y):
plt.plot(N, np.abs(y))
plt.show()
# DATA FUNCTIONS
def get_data()
def main():
return None

View File

@ -83,15 +83,3 @@ def denoice_dataset(handler:Handler.CSV_handler, subject_nr, which_arm, round, e
return df_new
# MOVE TO Present_data.py
# Plots DataFrame objects
def plot_df(df:DataFrame):
lines = df.plot.line(x='timestamp')
plt.show()
# Plots ndarrays after transformations
def plot_arrays(N, y):
plt.plot(N, np.abs(y))
plt.show()

View File

@ -50,7 +50,7 @@ def test_plot_wavelet_both_ways():
#print(len(cA_filt))
y_new_values = inverse_wavelet(df, cA_filt, cD_filt)
#print(len(y_new_values))
plot_arrays(N, y_new_values)
#plot_arrays(N, y_new_values)
def test_soft_load_func():
handler = CSV_handler()
@ -70,7 +70,7 @@ def test_total_denoising():
# Denoised df:
df_denoised = denoice_dataset(handler, 3, 'left', 3, 3, 0.2)
df_denoised = denoice_dataset(handler, 3, 'left', 3, 3, 0.7)
print(df_denoised.head)
x = get_xory_from_df('x', df)
@ -83,3 +83,4 @@ def test_total_denoising():
plt.show()
test_total_denoising()
#test_plot_wavelet_both_ways()