From 2044a2a44ffd0cecda5fc38fd4b1d959198a0e51 Mon Sep 17 00:00:00 2001 From: jcarron Date: Tue, 17 Oct 2023 16:52:40 +0200 Subject: [PATCH] avoid changing map in map2alm --- lenspyx/remapping/utils_geom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lenspyx/remapping/utils_geom.py b/lenspyx/remapping/utils_geom.py index 290ed76..bb6ad1f 100644 --- a/lenspyx/remapping/utils_geom.py +++ b/lenspyx/remapping/utils_geom.py @@ -183,7 +183,7 @@ def alm2map_spin(self, gclm:np.ndarray, spin:int, lmax:int, mmax:int, nthreads:i def map2alm_spin(self, m:np.ndarray, spin:int, lmax:int, mmax:int, nthreads:int, zbounds=(-1., 1.), **kwargs): # FIXME: method only here for backwards compatiblity assert zbounds[0] == -1 and zbounds[1] == 1., zbounds - return self.adjoint_synthesis(m, spin, lmax, mmax, nthreads, **kwargs) + return self.adjoint_synthesis(m.copy(), spin, lmax, mmax, nthreads, **kwargs) def alm2map(self, gclm:np.ndarray, lmax:int, mmax:int, nthreads:int, zbounds=(-1., 1.), **kwargs): # FIXME: method only here for backwards compatiblity @@ -193,7 +193,7 @@ def alm2map(self, gclm:np.ndarray, lmax:int, mmax:int, nthreads:int, zbounds=(-1 def map2alm(self, m:np.ndarray, lmax:int, mmax:int, nthreads:int, zbounds=(-1., 1.), **kwargs): # FIXME: method only here for backwards compatiblity assert zbounds[0] == -1 and zbounds[1] == 1., zbounds - return self.adjoint_synthesis(m, 0, lmax, mmax, nthreads, **kwargs).squeeze() + return self.adjoint_synthesis(m.copy(), 0, lmax, mmax, nthreads, **kwargs).squeeze() @staticmethod def rings2pix(geom:Geom, rings:np.ndarray[int]):