Skip to content

Commit

Permalink
Apply fix for interpolating over gaps to datetime variables too
Browse files Browse the repository at this point in the history
  • Loading branch information
hvdosser committed Apr 24, 2023
1 parent 4d44e85 commit 6dcc100
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyglider/seaexplorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 6dcc100

Please sign in to comment.