From 479bc60e01ffc260bc66397931dd3973da1f03b0 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 17 Mar 2023 13:39:09 +0100 Subject: null: fix initial condition for non-zero shift --- null.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/null.py b/null.py index 407987f..c0f08ee 100644 --- a/null.py +++ b/null.py @@ -89,8 +89,10 @@ def _null_geodesic_kernel(times, t0, events, pu_t_0, gtX, gtX_dX, gtX_dt): gtt_0 = gtt(t0, 0.0).flatten()[0] gXX_0 = gXX(t0, 0.0).flatten()[0] + gtX_0 = gtX(t0, 0.0).flatten()[0] - pu_X_0 = np.sqrt(-gtt_0 / gXX_0) * pu_t_0 + term_t = gtX_0 * pu_t_0 + pu_X_0 = (-term_t + np.sqrt(term_t * term_t - gtt_0 * gXX_0 * pu_t_0 * pu_t_0)) / gXX_0 args = { # workaround for older versions of scipy not supporting args for fun -- cgit v1.2.3