In Observables.jl the function
function get_convergence_to_state(sol::AbstractODESolution, state, distance; tail_frac=0.8)
L = length(sol.t)
idx = max(1, round(Int, tail_frac*L)):L
x = sol.t[idx]
y = [distance(state, p) for p in sol.u[idx]]
X = zeros(length(x),2)
X[:,1] = x
X[:,2] .= 1.0
slope, intercept = X \ log.(y)
return slope
end
returns slope = NaN if the distance(state, p) = 0.0 and therefore y is 0.0 somewhere.
Might be resolved by just calculating slope = x \ log.(y). Then the slope = -inf if the distance y is 0.0 somewhere.