From 74eeac68c469e609dae9e46849895d8dff0a3179 Mon Sep 17 00:00:00 2001 From: Rik van Lieshout Date: Thu, 20 Jun 2024 16:54:13 -0700 Subject: [PATCH] fix(hfb.analysis): fix _interpolation_linear wrap mode --- ch_pipeline/hfb/analysis.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch_pipeline/hfb/analysis.py b/ch_pipeline/hfb/analysis.py index 4a3d89fe..262bb08d 100644 --- a/ch_pipeline/hfb/analysis.py +++ b/ch_pipeline/hfb/analysis.py @@ -1317,9 +1317,9 @@ def _interpolation_linear(x, y, w, xeval, mode="zero", xperiod=None): # For points below and above the range of x, overwrite the interval, # adjusting for the period if below.size > 0: - adx1[below] = xeval - x[ind1] - xperiod + adx1[below] = xeval[below] - x[-1] - xperiod if above.size > 0: - adx2[above] = x[ind2] + xperiod - xeval + adx2[above] = x[0] + xperiod - xeval[above] # Compute relative weights of left and right points norm = tools.invert_no_zero(adx1 + adx2)