From 6dcc100db48226c059e467e17f7190a4a9be72ca Mon Sep 17 00:00:00 2001 From: Hayley Dosser Date: Mon, 24 Apr 2023 09:23:36 -0700 Subject: [PATCH] Apply fix for interpolating over gaps to datetime variables too --- pyglider/seaexplorer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyglider/seaexplorer.py b/pyglider/seaexplorer.py index 7090d30..0183d9f 100644 --- a/pyglider/seaexplorer.py +++ b/pyglider/seaexplorer.py @@ -388,9 +388,9 @@ def raw_to_timeseries(indir, outdir, deploymentyaml, kind='raw', else: val = np.interp(time_timebase.astype(float), time_var.astype(float), var_non_nan) - # interpolate only over those gaps that are smaller than 'maxgap' - tg_ind = utils.find_gaps(time_var.astype(float),time_timebase.astype(float),maxgap) - val[tg_ind] = np.nan + # interpolate only over those gaps that are smaller than 'maxgap' + tg_ind = utils.find_gaps(time_var.astype(float),time_timebase.astype(float),maxgap) + val[tg_ind] = np.nan else: val = val[indctd]