Skip to content

Commit

Permalink
avoid changing map in map2alm
Browse files Browse the repository at this point in the history
  • Loading branch information
carronj committed Oct 17, 2023
1 parent 09d715b commit 2044a2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lenspyx/remapping/utils_geom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]):
Expand Down

0 comments on commit 2044a2a

Please sign in to comment.