Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
assignment Programming 2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Gastel, L. van (Lex, Student B-BMT)
assignment Programming 2
Commits
02ed4bfc
Commit
02ed4bfc
authored
1 week ago
by
LexvanGastel
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit - Added DataRetrieval and SignalProcessing classes
parent
998fe038
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
main.py
+30
-1
30 additions, 1 deletion
main.py
vraag3.py
+0
-2
0 additions, 2 deletions
vraag3.py
vraag4.py
+0
-8
0 additions, 8 deletions
vraag4.py
with
30 additions
and
11 deletions
main.py
+
30
−
1
View file @
02ed4bfc
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
This diff is collapsed.
Click to expand it.
vraag3.py
deleted
100644 → 0
+
0
−
2
View file @
998fe038
t
=
"
hoi
"
print
(
t
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
vraag4.py
deleted
100644 → 0
+
0
−
8
View file @
998fe038
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
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