Added a test for the healpix/sharp tranform. Basic code compiles and work.

This commit is contained in:
Guilhem Lavaux 2012-11-10 12:22:37 -05:00
parent 707a25bda3
commit 352c6b6eb6
4 changed files with 104 additions and 39 deletions

View file

@ -0,0 +1,20 @@
#include <iostream>
#include "fourier/healpix.hpp"
using namespace CosmoTool;
using namespace std;
int main()
{
HealpixFourierTransform<double> dft(128,3*128,3*128, 40);
long Npix = dft.realSpace().size();
dft.realSpace().eigen().setRandom();
dft.analysis();
cout << "Map dot-product = " << dft.realSpace().dot_product(dft.realSpace()) << endl;
cout << "Fourier dot-product = " << dft.fourierSpace().dot_product(dft.fourierSpace()).real()*Npix/(4*M_PI) << endl;
dft.synthesis();
cout << "Resynthesis dot-product = " << dft.realSpace().dot_product(dft.realSpace()) << endl;
return 0;
}