aboutsummaryrefslogtreecommitdiff
path: root/src/likelihood.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/likelihood.c')
-rw-r--r--src/likelihood.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/likelihood.c b/src/likelihood.c
index 6ddd576..76364fd 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -83,7 +83,7 @@ double log_pt(double t, size_t n, double mu_noise, double mu_indirect, double *m
* different transit times across the face of the PMT, it seems better to
* convolve first which is what we do here. In addition, the problem is not
* analytically tractable if you do things the other way around. */
- return log(n) + (n-1)*log1p(-F(t,mu_noise,mu_indirect,mu_direct,n2,ts,tmean,sigma)) + log(f(t,mu_noise,mu_indirect,mu_direct,n2,ts,tmean,sigma));
+ return ln(n) + (n-1)*log1p(-F(t,mu_noise,mu_indirect,mu_direct,n2,ts,tmean,sigma)) + log(f(t,mu_noise,mu_indirect,mu_direct,n2,ts,tmean,sigma));
}
static double gsl_muon_time(double x, void *params)
@@ -414,7 +414,7 @@ double nll_muon(event *ev, double T0, double *pos, double *dir, double t0, doubl
logp[j] = log(pq(ev->pmt_hits[i].qhs,j)) - mu[i] + j*log_mu - lnfact(j) + log_pt(ev->pmt_hits[i].t, j, mu_noise, mu_indirect, &mu_direct[i], 1, &ts[i], tmean, 1.5);
if (j == 1 || logp[j] > max_logp) max_logp = logp[j];
- if (logp[j] - max_logp < MIN_RATIO*log(10)) {
+ if (logp[j] - max_logp < MIN_RATIO*ln(10)) {
j++;
break;
}