Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
HRV_MEG
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ryan Christopher Godwin
HRV_MEG
Commits
9e22734d
Commit
9e22734d
authored
1 year ago
by
Ryan Godwin
Browse files
Options
Downloads
Patches
Plain Diff
adding documentation & removing empty exploratory notebook
parent
8dfcedbb
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Feature/execute
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
exploration/packagetest.ipynb
+0
-0
0 additions, 0 deletions
exploration/packagetest.ipynb
src/hrvmeg/preprocess_ecg.py
+24
-0
24 additions, 0 deletions
src/hrvmeg/preprocess_ecg.py
with
24 additions
and
0 deletions
exploration/packagetest.ipynb
deleted
100644 → 0
+
0
−
0
View file @
8dfcedbb
This diff is collapsed.
Click to expand it.
src/hrvmeg/preprocess_ecg.py
+
24
−
0
View file @
9e22734d
...
...
@@ -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
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment