Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Katerina Chatziioannou
bayeswave
Commits
1b351ad3
Commit
1b351ad3
authored
Oct 01, 2020
by
Marcella Wijngaarden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CBC waveform in extrinsic likelihood + less debug output
parent
542dfb34
Pipeline
#159232
failed with stages
in 1 minute and 40 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
src/BayesCBC.c
src/BayesCBC.c
+0
-2
src/BayesWaveLikelihood.c
src/BayesWaveLikelihood.c
+4
-6
src/BayesWaveMCMC.c
src/BayesWaveMCMC.c
+3
-4
No files found.
src/BayesCBC.c
View file @
1b351ad3
...
...
@@ -4641,8 +4641,6 @@ void projectCBCWaveform(double *ampphase, int N, int NI, double fmin, double Tob
}
}
}
printf("done the loop!\n");
}
void geowave(double *gwave, RealVector *freq, double *params, int N, struct bayesCBC *rundata)
...
...
src/BayesWaveLikelihood.c
View file @
1b351ad3
...
...
@@ -886,7 +886,7 @@ double EvaluateExtrinsicMarkovianLogLikelihood(struct Network *projection, doubl
if
(
data
->
bayesCBCFlag
)
{
// for(i=0; i<NI; i++) for(n=0; n<N; n++) c[i][n] = 0.0;
projectCBCWaveform
(
amphase
,
N
,
NI
,
fmin
,
data
->
Tobs
,
extP
arams
,
c
,
projection
->
dtimes
,
projection
->
Fplus
,
projection
->
Fcross
);
projectCBCWaveform
(
amphase
,
N
,
NI
,
fmin
,
data
->
Tobs
,
p
arams
,
c
,
projection
->
dtimes
,
projection
->
Fplus
,
projection
->
Fcross
);
}
//Form up residual
...
...
@@ -902,8 +902,6 @@ double EvaluateExtrinsicMarkovianLogLikelihood(struct Network *projection, doubl
logL
+=
loglike
(
imin
,
imax
,
r
[
ifo
],
invSnf
[
ifo
]);
}
// if(data->bayesCBCFlag) print_projected_cbc_waveform(c[ifo][n]);
free_double_matrix
(
h
,
NI
-
1
);
free_double_matrix
(
r
,
NI
-
1
);
free_double_matrix
(
t
,
NP
-
1
);
...
...
@@ -949,7 +947,7 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
//compute instrument response from cbc waveform at geocenter with extrinsic params
if
(
data
->
bayesCBCFlag
)
{
projectCBCWaveform
(
amphase
,
N
,
NI
,
fmin
,
data
->
Tobs
,
extP
arams
,
c
,
projection
->
dtimes
,
projection
->
Fplus
,
projection
->
Fcross
);
projectCBCWaveform
(
amphase
,
N
,
NI
,
fmin
,
data
->
Tobs
,
p
arams
,
c
,
projection
->
dtimes
,
projection
->
Fplus
,
projection
->
Fcross
);
}
//Form up residual
...
...
@@ -993,10 +991,10 @@ double EvaluateExtrinsicSearchLogLikelihood(struct Network *projection, double *
computeProjectionCoeffs
(
data
,
projection
,
params
,
data
->
fmin
,
data
->
fmax
);
waveformProject
(
data
,
projection
,
params
,
h
,
t
,
data
->
fmin
,
data
->
fmax
);
compute
instrument
response
from
cbc
waveform
at
geocenter
with
extrinsic
params
//
compute instrument response from cbc waveform at geocenter with extrinsic params
if
(
data
->
bayesCBCFlag
)
{
projectCBCWaveform
(
amphase
,
N
,
NI
,
fmin
,
data
->
Tobs
,
extP
arams
,
c
,
projection
->
dtimes
,
projection
->
Fplus
,
projection
->
Fcross
);
projectCBCWaveform
(
amphase
,
N
,
NI
,
fmin
,
data
->
Tobs
,
p
arams
,
c
,
projection
->
dtimes
,
projection
->
Fplus
,
projection
->
Fcross
);
}
//Form up residual
...
...
src/BayesWaveMCMC.c
View file @
1b351ad3
...
...
@@ -1358,7 +1358,7 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
{
model
[
chain
->
index
[
ic
]]
->
cbcParams
[
i
]
=
bayescbc
->
pallx
[
chain
->
index
[
ic
]][
i
];
}
// cbcGeo
Templat
e(bayescbc, chain->index[ic], data->N, model[chain->index[ic]]->cbcamphase);
// cbcGeo
AmpPhas
e(bayescbc, chain->index[ic], data->N, model[chain->index[ic]]->cbcamphase);
// waveformProject(data, model[chain->index[ic]]->projection, model[chain->index[ic]]->extParams, model[chain->index[ic]]->cbctemplate, model[chain->index[ic]]->cbcamphase, data->fmin, data->fmax);
}
...
...
@@ -1369,7 +1369,6 @@ void RJMCMC(struct Data *data, struct Model **model, struct BayesLineParams ***b
copy_cbc_model
(
model
[
chain
->
index
[
0
]],
model_MAP
,
N
,
NI
,
data
->
NX
);
fprintf
(
stdout
,
" ======= End of CBC_burnin() ======
\n
"
);
for
(
ic
=
0
;
ic
<
chain
->
NC
;
ic
++
)
printf
(
"chain %i -> index %i
\n
"
,
ic
,
chain
->
index
[
ic
]);
}
/******************************************************************************/
...
...
@@ -2743,7 +2742,7 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
bayescbc
->
mxc
[
0
]
=
chain
->
mc
;
bayescbc
->
who
=
chain
->
index
;
if
(
bayescbc
->
debug
==
1
)
printf
(
"before BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f
\n
"
,
chain
->
index
[
ic
],
ic
,
model_x
->
logL
,
model_x
->
logLnorm
,
bayescbc
->
logLx
[
icbc
]);
//
if (bayescbc->debug==1) printf("before BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f \n", chain->index[ic], ic, model_x->logL, model_x->logLnorm, bayescbc->logLx[icbc]);
// Do updates
BayesCBC_MCMC
(
M
,
N
,
data
->
Tobs
,
data
->
trigtime
,
chain
->
seed
,
istart
,
bayescbc
,
ic
,
model_x
->
cbcamphase
);
...
...
@@ -2788,7 +2787,7 @@ void EvolveBayesCBCParameters(struct Data *data, struct Model **model, struct ba
}
}
if
(
bayescbc
->
debug
==
1
)
printf
(
"after BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f
\n
"
,
chain
->
index
[
ic
],
ic
,
model_x
->
logL
,
model_x
->
logLnorm
,
bayescbc
->
logLx
[
icbc
]);
//
if (bayescbc->debug==1) printf("after BayesCBC_MCMC chain %i, %i, model_x->logL = %f, logLnorm = %f, logLx = %f \n", chain->index[ic], ic, model_x->logL, model_x->logLnorm, bayescbc->logLx[icbc]);
return
;
}
...
...
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