Skip to content

Commit

Permalink
CLN: changed how noise_abs is calculated from noise_rel in gen_pde_data
Browse files Browse the repository at this point in the history
  • Loading branch information
yb6599 committed Jul 29, 2024
1 parent ef4f7cc commit 27deee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen_experiments/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def gen_pde_data(
x_dot_test = [np.moveaxis(x_dot_test, 0, -2)]
x_train_true = np.copy(x_train)
if noise_rel is not None:
noise_abs = _max_amplitude(x_test) * noise_rel
noise_abs = np.sqrt(_signal_avg_power(x_test) * noise_rel)
x_train = x_train + cast(float, noise_abs) * rng.standard_normal(x_train.shape)
x_train = [np.moveaxis(x_train, 0, -2)]
x_train_true = np.moveaxis(x_train_true, 0, -2)
Expand Down

0 comments on commit 27deee8

Please sign in to comment.