2012-11-10 18:22:37 +01:00
|
|
|
#include <iostream>
|
|
|
|
#include "fourier/healpix.hpp"
|
|
|
|
|
|
|
|
using namespace CosmoTool;
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2012-11-10 23:35:27 +01:00
|
|
|
HealpixFourierTransform<double> dft(128,2*128,2*128, 40);
|
2012-11-10 18:22:37 +01:00
|
|
|
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;
|
|
|
|
|
|
|
|
}
|