diff --git a/Present_data.py b/Present_data.py index e69de29..13b7039 100644 --- a/Present_data.py +++ b/Present_data.py @@ -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 diff --git a/Signal_prep.py b/Signal_prep.py index b678861..3285084 100644 --- a/Signal_prep.py +++ b/Signal_prep.py @@ -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() - diff --git a/Test_functions.py b/Test_functions.py index dd5ade5..3e1cd37 100644 --- a/Test_functions.py +++ b/Test_functions.py @@ -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()