From 91479945eb85250c12e7d49de36bf38ef1117a5b Mon Sep 17 00:00:00 2001 From: Christian Haack Date: Fri, 24 Jan 2025 17:56:06 +0100 Subject: [PATCH] fix make_inverse_es_polynomial to ensure proper type handling for cos_theta --- src/scattering.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scattering.jl b/src/scattering.jl index 7f849c3..0b4ed1a 100644 --- a/src/scattering.jl +++ b/src/scattering.jl @@ -126,7 +126,7 @@ end Make a 3rd order polynomial that approximates the inverse of the ES scattering function. """ function make_inverse_es_polynomial(b::T) where {T<:Real} - cos_theta = -1:0.01:1 + cos_theta = T.(-1:0.01:1) es_poly = fit(Polynomial, es_scattering_cumulative.(cos_theta, b), cos_theta, 3) return ImmutablePolynomial(Tuple(T.(collect(es_poly)))) end