Commit a468fbae authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cleanup

parent 3bfd90b9
Pipeline #70491 passed with stages
in 8 minutes and 54 seconds
......@@ -43,7 +43,6 @@ ptg=np.random.uniform(0.,1.,3*1000000).reshape(1000000,3)
ptg[:,0]*=np.pi
ptg[:,1]*=2*np.pi
ptg[:,2]*=2*np.pi
#ptg = np.array([[0.129,0.01,1.],[3.1,0.7,2.]])
foo = interpol_ng.PyInterpolator(slmT,blmT,lmax, kmax, epsilon=1e-6, nthreads=1)
bar=foo.interpol(ptg)
print(foo.Nphi(),foo.Nphi0())
......@@ -51,6 +50,6 @@ fake = np.random.uniform(0.,1., ptg.shape[0])
foo2 = interpol_ng.PyInterpolator(lmax, kmax, epsilon=1e-6, nthreads=2)
foo2.deinterpol(ptg.reshape((-1,3)), fake)
bla=foo2.getSlm(blmT)
print(myalmdot(slmT, np.conj(bla), lmax, lmax, 0))
print(myalmdot(slmT, bla, lmax, lmax, 0))
print(np.vdot(fake,bar))
print(myalmdot(slmT, np.conj(bla), lmax, lmax, 0)/np.vdot(fake,bar))
print(myalmdot(slmT, bla, lmax, lmax, 0)/np.vdot(fake,bar))
......@@ -381,7 +381,7 @@ for (size_t j=0,j2=nphi/2; j<nphi/2; ++j,++j2)
sharp_alm2map_adjoint(a1.Alms().vdata(), m1.data(), *ginfo, *ainfo, 0, nthreads);
for (size_t m=0; m<=lmax; ++m)
for (size_t l=m; l<=lmax; ++l)
slmT(l,m)=conj(a1(l,m))*blmT(l,0).real()*T(lnorm[l]);
slmT(l,m)=a1(l,m)*blmT(l,0).real()*T(lnorm[l]);
}
for (size_t k=1; k<=kmax; ++k)
......@@ -409,8 +409,8 @@ for (size_t j=0,j2=nphi/2; j<nphi/2; ++j,++j2)
if (l>=k)
{
auto tmp = -2.*conj(blmT(l,k))*T(lnorm[l]);
slmT(l,m) += conj(a1(l,m))*tmp.real();
slmT(l,m) -= conj(a2(l,m))*tmp.imag();
slmT(l,m) += a1(l,m)*tmp.real();
slmT(l,m) -= a2(l,m)*tmp.imag();
}
}
}
......
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