Fix for NetCDF-4 ordering. Added new constructor to Fourier/Healpix to support weighted rings.

This commit is contained in:
Guilhem Lavaux 2013-07-17 12:11:55 +02:00
parent cfae6184d5
commit 083cad3c77
2 changed files with 13 additions and 4 deletions

View File

@ -36,6 +36,8 @@ knowledge of the CeCILL license and that you accept its terms.
#ifndef __COSMOTOOL_FOURIER_HEALPIX_DETAILS_TRANSFORM_HPP
#define __COSMOTOOL_FOURIER_HEALPIX_DETAILS_TRANSFORM_HPP
#include <valarray>
namespace CosmoTool
{
@ -65,6 +67,13 @@ namespace CosmoTool
sharp_make_triangular_alm_info (Lmax, Mmax, 1, &ainfo);
}
HealpixFourierTransform(long nSide, long Lmax, long Mmax, int iterate = 0, const std::valarray<double>& weights )
: realMap(nSide), fourierMap(Lmax, Mmax), ainfo(0), ginfo(0), m_iterate(iterate)
{
sharp_make_weighted_healpix_geom_info (nSide, 1, &weights[0], &ginfo);
sharp_make_triangular_alm_info (Lmax, Mmax, 1, &ainfo);
}
virtual ~HealpixFourierTransform()
{
sharp_destroy_geom_info(ginfo);

View File

@ -131,9 +131,9 @@ public:
{
if (curPos[i] == dimList[i].getSize())
{
curPos[i-1]++;
curPos[i] = 0;
}
curPos[i-1]++;
curPos[i] = 0;
}
}
}
};
@ -174,7 +174,7 @@ namespace CosmoTool {
vector<NcDim> ldimList;
for (uint32_t i = 0; i < rank; i++)
ldimList.push_back(dimArray[rank-1-i]);
ldimList.push_back(dimArray[i]);
OutputGenCDF<T> *impl = new OutputGenCDF<T>(f, v, ldimList, rank);
return ProgressiveOutput<T>(impl);