Added a test for the healpix/sharp tranform. Basic code compiles and work.
This commit is contained in:
parent
707a25bda3
commit
352c6b6eb6
4 changed files with 104 additions and 39 deletions
20
sample/test_healpix_calls.cpp
Normal file
20
sample/test_healpix_calls.cpp
Normal 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;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue