Skip to content
Snippets Groups Projects
Commit 02ed4bfc authored by LexvanGastel's avatar LexvanGastel
Browse files

Initial commit - Added DataRetrieval and SignalProcessing classes

parent 998fe038
No related branches found
No related tags found
No related merge requests found
import scipy.io
from scipy.signal import butter, filtfilt
def load_emg_data(file_path):
......@@ -28,4 +29,32 @@ chosen_muscles = {
'rectus_fomoris': 0,
'tibialis_anterior': 7
}
print(f"Gekozen spieren: {chosen_muscles}")
\ No newline at end of file
print(f"Gekozen spieren: {chosen_muscles}")
class DataRetrieval:
def __init__(self, file_path):
self.file_path = file_path
self.emg_data = None
self.channel_names = None
def load_data(self):
mat_data = scipy.io.loadmat(self.file_path)
self.emg_data = mat_data['emg_data_walking']
self.channel_names = emg_data['data_headers'][0][0]
self.channel_names = [ch[0] for ch in self.channel_names[0]]
def get_channel_names(self):
return self.channel_names
class SignalProcessing:
def __init__(self, emg_data, fs):
self.emg_data = emg_data
self.fs = fs
def bandpass_filter(self, data, lowcut, highcut):
#komt nog filters
pass
def power_spectral_analysis(self, data):
#methode
pass
\ No newline at end of file
t = "hoi"
print(t)
\ No newline at end of file
import numpy as np
import scipy.signal as signal
class Dataretrieval:
def __init__(self, filiepath: str):
self.filepath = filepath
self.data = None
self.sampling_rate
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment