From 3de0eb21c7735ca4b671c270608abc742fec134a Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Sat, 13 Aug 2022 11:00:59 -0500 Subject: [PATCH] snapshot... --- modules/util/util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/util/util.py b/modules/util/util.py index 542a15c7..a40686c0 100644 --- a/modules/util/util.py +++ b/modules/util/util.py @@ -383,7 +383,7 @@ def make_histogram(values, edges): return h -def normalize(data, param, mean_std_dict, add_noise=False, noise_scale=1.0, seed=None): +def normalize(data, param, mean_std_dict, add_noise=False, noise_scale=0.01, seed=None): if mean_std_dict.get(param) is None: return data @@ -398,7 +398,8 @@ def normalize(data, param, mean_std_dict, add_noise=False, noise_scale=1.0, seed if add_noise: if seed is not None: np.random.seed(seed) - rnd = np.random.normal(loc=0, scale=noise_scale, size=data.size) + rnd = np.random.normal(loc=0, size=data.size) + rnd *= noise_scale data += rnd not_valid = np.isnan(data) -- GitLab