Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Docker-in-Docker (DinD) capabilities of public runners deactivated.
More info
Open sidebar
Xavier Garrido
CAMEL
Commits
34097bd6
Commit
34097bd6
authored
Jun 06, 2019
by
Xavier Garrido
Browse files
move Class engine into update method
parent
0f17b1ec
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
src/camel/Astro/cib_interface.cc
src/camel/Astro/cib_interface.cc
+1
-1
src/camel/Astro/cib_interface.h
src/camel/Astro/cib_interface.h
+3
-3
src/camel/CMB/HillipopCIB.cc
src/camel/CMB/HillipopCIB.cc
+12
-3
src/camel/CMB/HillipopCIB.hh
src/camel/CMB/HillipopCIB.hh
+3
-0
No files found.
src/camel/Astro/cib_interface.cc
View file @
34097bd6
...
...
@@ -67,7 +67,7 @@ namespace cib {
_initialized_
=
true
;
}
void
cib_interface
::
update
(
const
cib
::
cib_parameters
&
parameters_
,
ClassEngine
*
klass_
)
void
cib_interface
::
update
(
const
cib
::
cib_parameters
&
parameters_
,
Mn
ClassEngine
*
klass_
)
{
if
(
!
_initialized_
)
{
throw
std
::
logic_error
(
"cib_interface::update: CIB model not initialized !"
);
...
...
src/camel/Astro/cib_interface.h
View file @
34097bd6
...
...
@@ -4,7 +4,7 @@
#include "Astro/utils.h"
// Forward declaration
class
ClassEngine
;
class
Mn
ClassEngine
;
namespace
cib
{
...
...
@@ -32,7 +32,7 @@ namespace cib {
void
initialize
();
/// Update CIB parameters
void
update
(
const
cib
::
cib_parameters
&
parameters_
,
ClassEngine
*
klass_
);
void
update
(
const
cib
::
cib_parameters
&
parameters_
,
Mn
ClassEngine
*
klass_
);
/// Compute and retrieve Cls
void
compute_cls
(
cib
::
array3d
&
cl_cib_
,
...
...
@@ -70,7 +70,7 @@ namespace cib {
bool
_initialized_
;
/// Class engine
ClassEngine
*
_klass_
;
Mn
ClassEngine
*
_klass_
;
/// CIB parameter model
cib_parameters
_parameters_
;
...
...
src/camel/CMB/HillipopCIB.cc
View file @
34097bd6
...
...
@@ -4,7 +4,8 @@
HillipopCIB
::
HillipopCIB
(
const
string
fileName
)
:
Hillipop
(
fileName
)
{
std
::
cout
<<
"HillipopCIB::HillipopCIB: Entering..."
<<
std
::
endl
;
std
::
cout
<<
"HillipopCIB::HillipopCIB: Initalize CIB model..."
<<
std
::
endl
;
_cib_
.
initialize
();
}
HillipopCIB
::~
HillipopCIB
()
...
...
@@ -149,8 +150,16 @@ void HillipopCIB::computeResiduals(vector<double> ClCMB, vector<double>& nuisanc
// tSZ amplitude
if
(
_typeStatus
[
0
])
Asz
=
nuisance
[
getIndex
(
"Asz"
)];
// CIB amplitude
if
(
_typeStatus
[
0
])
Acib
=
nuisance
[
getIndex
(
"Acib"
)];
// CIB parameters
if
(
_typeStatus
[
0
])
{
cib
::
cib_parameters
params
;
params
.
Meffmax
=
nuisance
[
getIndex
(
"Meffmax"
)];
params
.
etamax
=
nuisance
[
getIndex
(
"etamax"
)];
params
.
sigmaMh
=
nuisance
[
getIndex
(
"sigmaMh"
)];
params
.
tau
=
nuisance
[
getIndex
(
"tau_cib"
)];
// Update CIB model given new parameters
_cib_
.
update
(
params
,
klass
);
}
// Dust amplitude
if
(
_typeStatus
[
0
])
AdustTT
=
nuisance
[
getIndex
(
"AdustTT"
)];
...
...
src/camel/CMB/HillipopCIB.hh
View file @
34097bd6
...
...
@@ -2,6 +2,7 @@
#define HillipopCIB_hh
#include "CMB/Hillipop.hh"
#include "Astro/cib_interface.h"
class
Engine
;
...
...
@@ -27,6 +28,8 @@ public:
// Compute residuals
void
computeResiduals
(
vector
<
double
>
ClCMB
,
vector
<
double
>&
nuisance
,
bool
fullRange
,
Engine
*
engine
);
private:
cib
::
cib_interface
_cib_
;
};
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment