Healpix C++  3.50
weight_utils.h
Go to the documentation of this file.
1 /*
2  * This file is part of Healpix_cxx.
3  *
4  * Healpix_cxx is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * Healpix_cxx is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Healpix_cxx; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * For more information about HEALPix, see http://healpix.sourceforge.net
19  */
20 
21 /*
22  * Healpix_cxx is being developed at the Max-Planck-Institut fuer Astrophysik
23  * and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
24  * (DLR).
25  */
26 
27 /*! \file weight_utils.h
28  *
29  * Copyright (C) 2016-2018 Max-Planck-Society
30  * \author Martin Reinecke
31  */
32 
33 #ifndef PLANCK_WEIGHT_UTILS_H
34 #define PLANCK_WEIGHT_UTILS_H
35 
36 #include <vector>
37 #include "healpix_map.h"
38 
39 /*! Applies the vector \a wgt containing compressed full weights to \a map. */
40 template<typename T>void apply_fullweights (Healpix_Map<T> &map,
41  const std::vector<double> &wgt);
42 
43 /*! Computes full weights for a map of the given \a nside at a maximum
44  multipole \a lmax. The solution is obtained via CGNE iteration, which stops
45  once the norm of the residual falls below \a epsilon times the norm of the
46  initial residual, or once \a itmax iterations have been performed.
47  \returns a vector containing the compressed full weights.
48  \note \a lmax must be even; odd \a l do not contribute to the weights. */
49 std::vector<double> get_fullweights(int nside, int lmax, double epsilon,
50  int itmax, double &epsilon_out);
51 
52 /*! Computes ring weights for a map of the given \a nside at a maximum
53  multipole \a lmax. The solution is obtained via CGNE iteration, which stops
54  once the norm of the residual falls below \a epsilon times the norm of the
55  initial residual, or once \a itmax iterations have been performed.
56  \returns a vector of size \c 2*nside containing the ring weights.
57  \note \a lmax must be even; odd \a l do not contribute to the weights. */
58 std::vector<double> get_ringweights(int nside, int lmax, double epsilon,
59  int itmax, double &epsilon_out);
60 
61 #endif
std::vector< double > get_ringweights(int nside, int lmax, double epsilon, int itmax, double &epsilon_out)
void apply_fullweights(Healpix_Map< T > &map, const std::vector< double > &wgt)
std::vector< double > get_fullweights(int nside, int lmax, double epsilon, int itmax, double &epsilon_out)

Generated on Mon Dec 10 2018 10:24:22 for Healpix C++