Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
grond
Commits
2f76860c
Commit
2f76860c
authored
Dec 19, 2016
by
Sebastian Heimann
Browse files
synthetic tests: add white noise option
parent
7f163473
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core.py
View file @
2f76860c
...
...
@@ -684,6 +684,8 @@ class SyntheticTest(Object):
inject_solution
=
Bool
.
T
(
default
=
False
)
respect_data_availability
=
Bool
.
T
(
default
=
False
)
add_real_noise
=
Bool
.
T
(
default
=
False
)
add_white_noise
=
Bool
.
T
(
default
=
False
)
amplitude_white_noise
=
Float
.
T
(
default
=
1.0e-6
)
random_seed
=
Int
.
T
(
optional
=
True
)
random_response_scale
=
Float
.
T
(
default
=
0.0
)
toffset_real_noise
=
Float
.
T
(
default
=-
3600.
)
...
...
@@ -737,6 +739,13 @@ class SyntheticTest(Object):
tfade
=
tfade
,
transfer_function
=
tf
)
if
self
.
add_white_noise
:
u
=
num
.
random
.
normal
(
scale
=
self
.
amplitude_white_noise
,
size
=
tr
.
data_len
())
tr
.
ydata
+=
u
synthetics
[
result
.
trace
.
codes
]
=
tr
self
.
_synthetics
=
synthetics
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment