chore: moved presenting functions to Present_data.py
This commit is contained in:
parent
ed35db265a
commit
95dc84d6e5
@ -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
|
@ -83,15 +83,3 @@ def denoice_dataset(handler:Handler.CSV_handler, subject_nr, which_arm, round, e
|
|||||||
return df_new
|
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()
|
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ def test_plot_wavelet_both_ways():
|
|||||||
#print(len(cA_filt))
|
#print(len(cA_filt))
|
||||||
y_new_values = inverse_wavelet(df, cA_filt, cD_filt)
|
y_new_values = inverse_wavelet(df, cA_filt, cD_filt)
|
||||||
#print(len(y_new_values))
|
#print(len(y_new_values))
|
||||||
plot_arrays(N, y_new_values)
|
#plot_arrays(N, y_new_values)
|
||||||
|
|
||||||
def test_soft_load_func():
|
def test_soft_load_func():
|
||||||
handler = CSV_handler()
|
handler = CSV_handler()
|
||||||
@ -70,7 +70,7 @@ def test_total_denoising():
|
|||||||
|
|
||||||
|
|
||||||
# Denoised df:
|
# 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)
|
print(df_denoised.head)
|
||||||
|
|
||||||
x = get_xory_from_df('x', df)
|
x = get_xory_from_df('x', df)
|
||||||
@ -83,3 +83,4 @@ def test_total_denoising():
|
|||||||
plt.show()
|
plt.show()
|
||||||
|
|
||||||
test_total_denoising()
|
test_total_denoising()
|
||||||
|
#test_plot_wavelet_both_ways()
|
||||||
|
Loading…
Reference in New Issue
Block a user