From f93d19b96093cdd498639868700e0f722b7eb9b0 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Wed, 28 Nov 2018 09:46:52 -0600 Subject: 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. --- src/test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/test.c') diff --git a/src/test.c b/src/test.c index a3f98a9..8bd0688 100644 --- a/src/test.c +++ b/src/test.c @@ -404,7 +404,7 @@ int test_solid_angle(char *err) static double sno_charge(double q, void *params) { int n = ((int *) params)[0]; - return pq(q,n); + return get_pq(q,n); } int test_sno_charge_integral(char *err) @@ -431,8 +431,6 @@ int test_sno_charge_integral(char *err) goto err; } - free_charge(); - gsl_integration_cquad_workspace_free(w); return 0; -- cgit