From 4c3b6a0bcdb455dabb3e2cdfed910e49722609b7 Mon Sep 17 00:00:00 2001 From: tomrink <rink@ssec.wisc.edu> Date: Mon, 7 Jun 2021 18:09:22 -0500 Subject: [PATCH] minor --- modules/aeolus/datasource.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/aeolus/datasource.py b/modules/aeolus/datasource.py index b47331ec..ea4d41da 100644 --- a/modules/aeolus/datasource.py +++ b/modules/aeolus/datasource.py @@ -46,6 +46,8 @@ class Files: def get_file(self, timestamp, window=None): if window is None: window = self.span_seconds + else: + window = datetime.timedelta(minutes=window).seconds diff = self.ftimes[:, 0] - timestamp midx = np.argmin(np.abs(diff)) if np.abs(self.ftimes[midx, 0] - timestamp) < window: @@ -156,6 +158,8 @@ class AMVFiles: def get_file(self, timestamp, window=None): if window is None: window = self.span_seconds + else: + window = datetime.timedelta(minutes=window).seconds diff = self.ftimes[:, 0] - timestamp midx = np.argmin(np.abs(diff)) if np.abs(self.ftimes[midx, 0] - timestamp) < window: -- GitLab