Skip to content
Snippets Groups Projects
Commit 9e22734d authored by Ryan Godwin's avatar Ryan Godwin
Browse files

adding documentation & removing empty exploratory notebook

parent 8dfcedbb
No related branches found
No related tags found
1 merge request!2Feature/execute
......@@ -6,6 +6,17 @@ import plotter
def nk_preproc(ecg_signal, fs):
"""
It takes in an ECG signal and sampling frequency, and returns a dataframe with the raw and cleaned
ECG signals
Args:
ecg_signal: The raw ECG signal
fs: sampling frequency
Returns:
A dataframe with two columns, one for the raw ECG signal and one for the cleaned ECG signal.
"""
# Do processing
ecg_cleaned = nk.ecg_clean(ecg_signal, sampling_rate=fs, method="biosppy")
......@@ -16,6 +27,19 @@ def nk_preproc(ecg_signal, fs):
def preproc_ecg(file_path, fs, downsample_freq, output_folder):
"""
> It takes in the raw ECG data, preprocesses it using the biosppy library, and returns the
preprocessed data
Args:
file_path: the path to the file containing the ECG data
fs: sampling frequency of the data
downsample_freq: The frequency at which we want to downsample the data.
output_folder: The folder where the output files will be saved.
Returns:
A dictionary of downsampled signals
"""
ecg_data = pd.read_csv(file_path)
signals = nk_preproc(ecg_data.iloc[:, 0], fs)
downsamp_signals = {}
......
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