diff --git a/flipper/liteMap.py b/flipper/liteMap.py index 779cbb4..e1c40eb 100644 --- a/flipper/liteMap.py +++ b/flipper/liteMap.py @@ -12,8 +12,6 @@ import astropy.wcs import astropy.io.fits as pyfits -#import astropy.wcs as pywcs -#import pyfits import flipper.fft as fftfast import astLib @@ -26,7 +24,7 @@ import healpy import utils import time -from scipy.interpolate import splrep,splev +from scipy.interpolate import interp1d class gradMap: """ @brief Class describing gradient of a liteMap @@ -111,19 +109,10 @@ def fillWithGaussianRandomField(self,ell,Cell,bufferFactor = 1): iy, ix = np.mgrid[0:Ny,0:Nx] modLMap[iy,ix] = np.sqrt(ly[iy]**2+lx[ix]**2) - s = splrep(ell,Cell,k=3) - ll = np.ravel(modLMap) - kk = splev(ll,s) + kk = interp1d(ell, Cell, bounds_error=False, fill_value=0.)(ll) id = np.where(ll>ell.max()) - kk[id] = 0. - #add a cosine ^2 falloff at the very end - #id2 = np.where( (ll> (ell.max()-500)) & (ll 1: ell = np.ravel(twodPower.modLMap) Cell = np.ravel(twodPower.powerMap) - print ell - print Cell - s = splrep(ell,Cell,k=3) - - ll = np.ravel(modLMap) - kk = splev(ll,s) - - + kk = interp1d(ell, Cell, bounds_error=False, fill_value=0.)(ll) id = np.where(ll>ell.max()) - kk[id] = 0. - # add a cosine ^2 falloff at the very end - # id2 = np.where( (ll> (ell.max()-500)) & (ll