Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
denoising
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Monitor
Incidents
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
aqdl
denoising
Compare revisions
7f175cfe8ff6c4f80a7b45e548b19bad07ecf889 to b9f002c22bed5b9eca2a3afedb8960b1e1b5aee3
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
aqdl/denoising
Select target project
No results found
b9f002c22bed5b9eca2a3afedb8960b1e1b5aee3
Select Git revision
Branches
develop
main
Swap
Target
aqdl/denoising
Select target project
aqdl/denoising
1 result
7f175cfe8ff6c4f80a7b45e548b19bad07ecf889
Select Git revision
Branches
develop
main
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
Remove notebook
· 57bcbad5
Islen Vallejo
authored
2 years ago
57bcbad5
Merge branch 'develop'
· d3ad79c4
Islen Vallejo
authored
2 years ago
d3ad79c4
Fix apparent bug
· b9f002c2
Islen Vallejo
authored
2 years ago
b9f002c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
denoising/__main__.py
+5
-10
5 additions, 10 deletions
denoising/__main__.py
denoising/outliers.py
+3
-1
3 additions, 1 deletion
denoising/outliers.py
with
8 additions
and
11 deletions
denoising/__main__.py
View file @
b9f002c2
...
...
@@ -4,11 +4,8 @@ from pathlib import Path
import
sys
from
scipy.signal
import
savgol_filter
import
copy
import
plotly.graph_objects
as
go
import
json
from
scipy.interpolate
import
PchipInterpolator
from
denoising
import
(
dataset
,
outliers
)
...
...
@@ -76,7 +73,6 @@ def main():
# OK !!!
tE
=
outliers
.
get_wavelet_spikes
(
signal
,
sfr
,
wid
,
L
,
wname
)
scor4
=
copy
.
deepcopy
(
scor3
)
for
k
in
range
(
len
(
tE
)):
...
...
@@ -85,12 +81,6 @@ def main():
# dataset.check_values(scor4)
# Interpolate reference at sensor time
reference_interpolator
=
PchipInterpolator
(
x
=
reference_data
.
values
[:,
0
],
y
=
reference_data
.
values
[:,
5
])
refint
=
reference_interpolator
(
sensor_data
.
values
[:,
0
])
# dataset.check_values(refint)
# NOTE: Call this scor5 to avoid overwritting scor4 for control porposes
scor5
=
savgol_filter
(
x
=
scor4
,
window_length
=
5
,
# window size used for filtering
...
...
@@ -98,6 +88,11 @@ def main():
# dataset.check_values(scor5)
# Interpolate reference at sensor time
reference_interpolator
=
PchipInterpolator
(
x
=
reference_data
.
values
[:,
0
],
y
=
reference_data
.
values
[:,
5
])
refint
=
reference_interpolator
(
sensor_data
.
values
[:,
0
])
# dataset.check_values(refint)
corr_matrix
=
np
.
corrcoef
(
refint
,
scor5
)
corr
=
corr_matrix
[
0
,
1
]
...
...
This diff is collapsed.
Click to expand it.
denoising/outliers.py
View file @
b9f002c2
...
...
@@ -81,6 +81,7 @@ def get_wavelet_spikes(signal: np.array, sfr, wid: np.array, L: float,
is_spike
[
0
,
[
0
,
-
1
]]
=
False
ind_ones
=
np
.
argmax
(
is_spike
[
0
,
:]
==
True
)
ind_ones_is_empty
=
not
ind_ones
.
any
()
tE
=
np
.
empty
([])
if
not
ind_ones_is_empty
:
# there will be 1 followed by -1 for each spike
temp
=
np
.
diff
(
is_spike
)
...
...
@@ -173,7 +174,8 @@ def get_spike_indexes(L, c, nt, nw, option, w):
Index
=
np
.
logical_or
(
io
,
Index
).
astype
(
int
)
io
=
Index
return
Index
return
io
# return Index
...
...
This diff is collapsed.
Click to expand it.