aboutsummaryrefslogtreecommitdiff
path: root/src/test-charge.c
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2018-11-28 09:46:52 -0600
committertlatorre <tlatorre@uchicago.edu>2018-11-28 09:46:52 -0600
commitf93d19b96093cdd498639868700e0f722b7eb9b0 (patch)
tree64891421c89e0d2b2f77618993c2444a35cc2eda /src/test-charge.c
parent22090220988bd7d5631481c5b4cbfa2f95c11131 (diff)
downloadsddm-f93d19b96093cdd498639868700e0f722b7eb9b0.tar.gz
sddm-f93d19b96093cdd498639868700e0f722b7eb9b0.tar.bz2
sddm-f93d19b96093cdd498639868700e0f722b7eb9b0.zip
update sno_charge.c
This commit adds lots of comments to sno_charge.c and makes a couple of other changes: - use interp1d() instead of the GSL interpolation routines - increase MAX_PE to 100 I increased MAX_PE because I determined that it had a rather large impact on the likelihood function for 500 MeV electrons. This unfortunately slows down the initialization by a lot. I think I could speed this up by convolving the single PE charge distribution with a gaussian *before* convolving the charge distributions to compute the charge distributions for multiple PE.
Diffstat (limited to 'src/test-charge.c')
-rw-r--r--src/test-charge.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/test-charge.c b/src/test-charge.c
index 2fe199b..2373beb 100644
--- a/src/test-charge.c
+++ b/src/test-charge.c
@@ -70,7 +70,7 @@ int main(int argc, char **argv)
for (i = 1; i <= n; i++) {
for (j = 0; j < nq; j++) {
- fprintf(pipe, "%.10f %.10f\n", x[j], pq(x[j],i));
+ fprintf(pipe, "%.10f %.10f\n", x[j], get_pq(x[j],i));
}
fprintf(pipe, "\n\n");
}
@@ -82,7 +82,5 @@ int main(int argc, char **argv)
free(x);
- free_charge();
-
return 0;
}