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


parent 37b7ef49
Pipeline #70056 passed with stages
in 8 minutes and 56 seconds
......@@ -2,6 +2,7 @@ import interpol_ng
import numpy as np
import pysharp
import time
import matplotlib.pyplot as plt
......@@ -32,10 +33,14 @@ slmT[0:lmax+1].imag = 0.
blmT = deltabeam(lmax,kmax)
# build interpolator object for slmT and blmT
foo = interpol_ng.PyInterpolator(slmT,blmT,lmax, kmax, epsilon=1e-6, nthreads=2)
print("setup time: ",time.time()-t0)
# evaluate total convolution on a sufficiently resolved Gauss-Legendre grid
# assemble a set of (theta, phi, psi) pointings, at which we want to evaluate
# the interpolated signal.
# For testig purposes, we choose theta and phi such that they form a
# Gauss-Legendre grid of sufficient resolution to recover the input a_lm
nth = lmax+1
nph = 2*mmax+1
ptg = np.zeros((nth,nph,3))
......@@ -45,17 +50,17 @@ ptg[:,:,0] = th.reshape((-1,1))
ptg[:,:,1] = (2*np.pi*np.arange(nph)/nph).reshape((1,-1))
ptg[:,:,2] = 0
# do the actual interpolation
print("interpolation time: ", time.time()-t0)
# get a_lm back from interpolated array
# get a_lm back from interpolation results
job = pysharp.sharpjob_d()
job.set_triangular_alm_info(lmax, mmax)
job.set_gauss_geometry(nth, nph)
alm2 = job.map2alm(bar.reshape((-1,)))
#compare with original a_lm
import matplotlib.pyplot as plt
plt.suptitle("Deviations between original and reconstructed a_lm")
......@@ -73,7 +73,7 @@ def get_extension_modules():
description='Python bindings for some libsharp functionality',
description='Python bindings for total convolution and interpolation library',
author='Martin Reinecke',
......@@ -36,6 +36,8 @@ namespace detail_es_kernel {
using namespace std;
/* This class implements the "exponential of semicircle" gridding kernel
described in */
class ES_Kernel
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