From 6c90057135aed13ce7b80a4499e56ec33193d4dc Mon Sep 17 00:00:00 2001 From: HappyZ Date: Thu, 23 May 2019 20:50:07 -0500 Subject: [PATCH] bug fix --- libs/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/models.py b/libs/models.py index 7d4a439..448da91 100644 --- a/libs/models.py +++ b/libs/models.py @@ -58,7 +58,7 @@ def log_gamma_floorplan( if isinstance(rx_loc, list) or isinstance(rx_loc, tuple): print("err: only support a single loc") return - noise = normal(GAUSSIAN_NOISE_MEAN, GAUSSIAN_NOISE_STD) if gaussian_noise else 0.0 + noise = np.random.normal(GAUSSIAN_NOISE_MEAN, GAUSSIAN_NOISE_STD) if gaussian_noise else 0.0 floorplan.traceRays(pwr, tx_loc) rss, paths = floorplan.traceRay(rx_loc) return max(rss + noise, NOISE_FLOOR), paths