Commit 2f76860c authored by Sebastian Heimann's avatar Sebastian Heimann
Browse files

synthetic tests: add white noise option

parent 7f163473
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment