From 80eb8cb2a31c5ee0bf3f20f401761cf17a90c930 Mon Sep 17 00:00:00 2001 From: EiffL Date: Tue, 17 May 2022 23:02:01 +0200 Subject: [PATCH] minor correction to gaussian smoothing --- jaxpm/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/jaxpm/utils.py b/jaxpm/utils.py index 189ab6c..8bf6e2e 100644 --- a/jaxpm/utils.py +++ b/jaxpm/utils.py @@ -93,6 +93,7 @@ def gaussian_smoothing(im, sigma): k = jnp.linalg.norm(kvec, axis=-1) # We compute the value of the filter at frequency k filter = norm(0, 1. / (2. * np.pi * sigma)).pdf(k) + filter /= filter[0,0] return jnp.fft.ifft2(jnp.fft.fft2(im) * filter).real