CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
Modelling_ThreePointCorrelation_comoving_reduced.cpp
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2017 by Federico Marulli *
3  * federico.marulli3@unibo.it *
4  * *
5  * This program is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU General Public License as *
7  * published by the Free Software Foundation; either version 2 of *
8  * the License, or (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public *
16  * License along with this program; if not, write to the Free *
17  * Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ********************************************************************/
20 
38 
39 using namespace std;
40 
41 using namespace cbl;
42 
43 
44 // ============================================================================================
45 
46 
48 {
49  // set the model parameters
50  const int nparameters = 2;
51 
52  vector<statistics::ParameterType> parameterType(nparameters, statistics::ParameterType::_Base_);
53 
54  vector<string> parameterName(nparameters);
55  parameterName[0] = "b1";
56  parameterName[1] = "b2";
57 
58  vector<statistics::PriorDistribution> priors = {bias1_prior, bias2_prior};
59 
60  // input data used to construct the model
61  auto inputs = make_shared<STR_data_model_threept>(m_data_model);
62 
63  //set the priors
64  m_set_prior(priors);
65 
66  // construct the model
67  m_model = make_shared<statistics::Model1D>(statistics::Model1D(&Q_nonlinear_localbias, nparameters, parameterType, parameterName, inputs));
68 }
69 
70 
71 // ============================================================================================
72 
73 
75 {
76  // set the model parameters
77  const int nparameters = 3;
78 
79  vector<statistics::ParameterType> parameterType(nparameters, statistics::ParameterType::_Base_);
80 
81  vector<string> parameterName(nparameters);
82  parameterName[0] = "b1";
83  parameterName[1] = "b2";
84  parameterName[2] = "g2";
85 
86  vector<statistics::PriorDistribution> priors = {bias1_prior, bias2_prior, g2_prior};
87 
88  // input data used to construct the model
89  auto inputs = make_shared<STR_data_model_threept>(m_data_model);
90 
91  //set the priors
92  m_set_prior(priors);
93 
94  // construct the model
95  m_model = make_shared<statistics::Model1D>(statistics::Model1D(&Q_nonlinear_nonlocalbias, nparameters, parameterType, parameterName, inputs));
96 }
97 
98 
99 // ============================================================================================
100 
101 
103 {
104  // set the model parameters
105  const int nparameters = 4;
106 
107  vector<statistics::ParameterType> parameterType(nparameters, statistics::ParameterType::_Base_);
108 
109  vector<string> parameterName(nparameters);
110  parameterName[0] = "b1";
111  parameterName[1] = "b2";
112  parameterName[2] = "g2";
113  parameterName[3] = "alpha";
114 
115  vector<statistics::PriorDistribution> priors = {bias1_prior, bias2_prior, g2_prior, alpha_prior};
116 
117  // input data used to construct the model
118  auto inputs = make_shared<STR_data_model_threept>(m_data_model);
119 
120  //set the priors
121  m_set_prior(priors);
122 
123  // construct the model
124  m_model = make_shared<statistics::Model1D>(statistics::Model1D(&Q_nonlinear_nonlocalbias_alpha, nparameters, parameterType, parameterName, inputs));
125 }
The class Modelling_ThreePointCorrelation_comoving_reduced.
void set_model_nonlinear_nonlocalbias(const statistics::PriorDistribution bias1_prior={}, const statistics::PriorDistribution bias2_prior={}, const statistics::PriorDistribution g2_prior={})
set the parameters used to model the reduced three-point correlation function in comoving coordinates...
void set_model_nonlinear_nonlocalbias_alpha(const statistics::PriorDistribution bias1_prior={}, const statistics::PriorDistribution bias2_prior={}, const statistics::PriorDistribution g2_prior={}, const statistics::PriorDistribution alpha_prior={})
set the parameters used to model the reduced three-point correlation function in comoving coordinates...
void set_model_nonlinear_localbias(const statistics::PriorDistribution bias1_prior={}, const statistics::PriorDistribution bias2_prior={})
set the parameters used to model the reduced three-point correlation function in comoving coordinates
The class Model1D.
Definition: Model1D.h:60
The class PriorDistribution.
std::vector< double > Q_nonlinear_localbias(const std::vector< double > theta, const std::shared_ptr< void > inputs, std::vector< double > &parameter)
model for the reduced three-point correlation function
std::vector< double > Q_nonlinear_nonlocalbias(const std::vector< double > theta, const std::shared_ptr< void > inputs, std::vector< double > &parameter)
model for the reduced three-point correlation function with non-local contributions
std::vector< double > Q_nonlinear_nonlocalbias_alpha(const std::vector< double > theta, const std::shared_ptr< void > inputs, std::vector< double > &parameter)
model for the reduced three-point correlation function with non-local contributions with alpha shift ...
The global namespace of the CosmoBolognaLib
Definition: CAMB.h:38