From 643204e807d5e78f883fc30dc7383a209e86dbc5 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Wed, 17 Oct 2018 09:33:29 -0500 Subject: fix a bug in the theta0 calculation for a path This commit fixes a bug in the calculation of the average rms width of the angular distribution for a path with a KL expansion. I also made a lot of updates to the test-path program: - plot the distribution of the KL expansion coefficients - plot the standard deviation of the angular distribution as a function of distance along with the prediction - plot the simulated and reconstructed path in 3D --- src/scattering.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/scattering.h') diff --git a/src/scattering.h b/src/scattering.h index 308f8ef..65765b0 100644 --- a/src/scattering.h +++ b/src/scattering.h @@ -1,6 +1,11 @@ #ifndef SCATTERING_H #define SCATTERING_H +/* Maximum value for the scattering RMS `theta0`. + * + * This is to prevent the interpolation from going out of bounds. */ +#define MAX_THETA0 1.0 + void init_interpolation(void); double get_probability(double beta, double cos_theta, double theta0); double get_probability2(double beta); -- cgit