Commit 99b6031e authored by Theo Steininger's avatar Theo Steininger
Browse files

Minor cleanups.

parent a13fba93
Pipeline #11741 passed with stage
in 10 minutes and 28 seconds
......@@ -83,14 +83,13 @@ class HPLMTransformation(SlicingTransformation):
super(HPLMTransformation, cls).check_codomain(domain, codomain)
def _transformation_of_slice(self, inp, **kwargs):
nside = self.domain.nside
lmax = self.codomain.lmax
mmax = lmax
nside= self.domain.nside
if issubclass(inp.dtype.type, np.complexfloating):
[resultReal, resultImag] = [pyHealpix.map2alm_iter(x,lmax,mmax,3)
for x in (inp.real, inp.imag)]
[resultReal,
resultImag] = [pyHealpix.map2alm_iter(x, lmax, mmax, 3)
for x in (inp.real, inp.imag)]
[resultReal,
resultImag] = [lm_transformation_factory.buildIdx(x, lmax=lmax)
......@@ -99,7 +98,7 @@ class HPLMTransformation(SlicingTransformation):
result = self._combine_complex_result(resultReal, resultImag)
else:
result = pyHealpix.map2alm_iter(inp,lmax,mmax,3)
result = pyHealpix.map2alm_iter(inp, lmax, mmax, 3)
result = lm_transformation_factory.buildIdx(result, lmax=lmax)
return result
......@@ -64,7 +64,7 @@ class LMHPTransformation(SlicingTransformation):
if not isinstance(domain, LMSpace):
raise TypeError("domain needs to be a LMSpace.")
nside = max((domain.lmax+1) // 2, 1)
nside = max((domain.lmax + 1)//2, 1)
result = HPSpace(nside=nside, dtype=domain.dtype)
return result
......@@ -94,13 +94,13 @@ class LMHPTransformation(SlicingTransformation):
resultImag] = [lm_transformation_factory.buildLm(x, lmax=lmax)
for x in (inp.real, inp.imag)]
[resultReal, resultImag] = [pyHealpix.alm2map(x,lmax,mmax,nside)
[resultReal, resultImag] = [pyHealpix.alm2map(x, lmax, mmax, nside)
for x in [resultReal, resultImag]]
result = self._combine_complex_result(resultReal, resultImag)
else:
result = lm_transformation_factory.buildLm(inp, lmax=lmax)
result = pyHealpix.alm2map(result,lmax,mmax,nside)
result = pyHealpix.alm2map(result, lmax, mmax, nside)
return result
......@@ -251,7 +251,7 @@ class RGSpace(Space):
cords = np.ogrid[inds]
dists = ((np.float64(0) + cords[0] - shape[0] // 2) * dk[0])**2
dists = ((cords[0] - shape[0]//2)*dk[0])**2
# apply zerocenterQ shift
if not self.zerocenter[0]:
dists = np.fft.ifftshift(dists)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment