CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
lensing_module.h
1#ifndef LENSING_MODULE_H
2#define LENSING_MODULE_H
3
4#include <map>
5#include <string>
6#include <vector>
7
8#include "acoustic_spline.h"
9#include "base_module.h"
10#include "input_module.h"
11
12class LensingModule : public BaseModule {
13 public:
14 LensingModule(InputModulePtr input_module, SpectraModulePtr spectra_module);
15 ~LensingModule();
16 std::map<std::string, std::vector<double>> cl_output(int lmax) const;
17 std::map<std::string, std::vector<double>> cl_output_computed() const;
18 void lensing_cl_at_l(int l, double* cl_lensed) const;
19
20 int l_unlensed_max_ = 0;
21 int l_lensed_max_ = 0;
23 private:
24 void lensing_init();
25 void lensing_indices();
26 std::map<std::string, std::vector<double>> cl_output_at_l_values(
27 const std::vector<int>& l_values) const;
28 void lensing_addback_cl_tt(const double* cl_tt);
29 void lensing_addback_cl_te(const double* cl_te);
30 void lensing_addback_cl_ee_bb(const double* cl_ee, const double* cl_bb);
31
35
36 bool has_tt_ = false;
37 bool has_ee_ = false;
38 bool has_te_ = false;
39 bool has_bb_ = false;
40 bool has_pp_ =
41 false;
42 bool has_tp_ = false;
43 bool has_dd_ = false;
44 bool has_td_ = false;
45 bool has_ll_ = false;
46 bool has_tl_ = false;
48 int index_lt_tt_ = -1;
49 int index_lt_ee_ = -1;
50 int index_lt_te_ = -1;
51 int index_lt_bb_ = -1;
52 int index_lt_pp_ = -1;
53 int index_lt_tp_ = -1;
54 int index_lt_dd_ = -1;
55 int index_lt_td_ = -1;
56 int index_lt_ll_ = -1;
57 int index_lt_tl_ = -1;
59 int lt_size_ = 0;
62
66
67 /* interpolable version: */
68
69 int l_size_ = 0;
71 std::vector<int> l_max_lt_;
74 std::vector<double> l_;
75 std::vector<double> cl_lens_;
79 std::vector<double> ddcl_lens_;
82 std::vector<std::pair<int, AcousticSpline>> acoustic_;
83
85 SpectraModulePtr spectra_module_;
86};
87
88#endif //LENSING_MODULE_H