From 8c87430b5978aa50420175cc916108580536b51d Mon Sep 17 00:00:00 2001 From: majsylw <58003896+majsylw@users.noreply.github.com> Date: Mon, 16 Aug 2021 09:26:53 +0200 Subject: [PATCH] add extrapolation possibility for iterp1d --- user_libs/DebyeFit/Debye_Fit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/user_libs/DebyeFit/Debye_Fit.py b/user_libs/DebyeFit/Debye_Fit.py index 6317aa08..2d11c7e0 100644 --- a/user_libs/DebyeFit/Debye_Fit.py +++ b/user_libs/DebyeFit/Debye_Fit.py @@ -637,9 +637,10 @@ class Rawdata(Relaxation): sys.exit("Error: The inputs should be numeric") self.set_freq(min(array[:, 0]), max(array[:, 0]), self.f_n) - - rl_interp = scipy.interpolate.interp1d(array[:, 0], array[:, 1]) - im_interp = scipy.interpolate.interp1d(array[:, 0], array[:, 2]) + rl_interp = scipy.interpolate.interp1d(array[:, 0], array[:, 1], + fill_value="extrapolate") + im_interp = scipy.interpolate.interp1d(array[:, 0], array[:, 2], + fill_value="extrapolate") return rl_interp(self.freq) - 1j * im_interp(self.freq)