Commit 0b85b69a authored by Christian Chapman-Bird's avatar Christian Chapman-Bird
Browse files

increased accuracy for p0 root-finding.

parent b911fc4d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ while place < batches:

        root = brentq_p_at_t(traj, T, traj_args=np.take(injection_params, traj_inds).tolist(),
                             traj_kwargs={'max_init_len': int(1e9)}, kerr_separatrix=not use_schwarz_separatrix,
                             xtol=1e-3)
                             xtol=1e-9)
        injection_params[3] = root

        injection_params[7] = np.random.uniform(0, np.pi)
+2 −2
Original line number Diff line number Diff line
@@ -341,13 +341,13 @@ def brentq_p_at_t(
            p_sep = get_separatrix(traj_args[index_of_a],traj_args[index_of_e],traj_args[index_of_Y]) # should be fairly close.
        else:
            p_sep = 6 + 2*traj_args[index_of_e]
        bounds = [p_sep + 0.1001, 50]
        bounds = [p_sep + 0.100001, 50]
    elif bounds[0] is None:
        if kerr_separatrix:
            p_sep = get_separatrix(traj_args[index_of_a],traj_args[index_of_e],traj_args[index_of_Y]) # should be fairly close.
        else:
            p_sep = 6 + 2*traj_args[index_of_e]
        bounds[0] = p_sep + 0.1001
        bounds[0] = p_sep + 0.100001
    elif bounds[1] is None:
        bounds[1] = 50