From 2ae4082b21b865e398e67eb4c0a6c04e9a6f5402 Mon Sep 17 00:00:00 2001 From: nickb <nickb@ssec.wisc.edu> Date: Thu, 2 Feb 2017 18:53:10 +0000 Subject: [PATCH] fix for the offsets being... off --- iff/aggregator.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iff/aggregator.py b/iff/aggregator.py index 245866d..2d670a6 100644 --- a/iff/aggregator.py +++ b/iff/aggregator.py @@ -186,6 +186,12 @@ class Aggregator(object): # aggregated IFF files, not into the original VIIRS granule!!! # XXX needs generalizing (use self._bounds_key) # (try test case: iff start time > start time of 1st granule) + + # NICKB: attempted fix for the above + first_index = np.nonzero(self._bounds_key)[0][0] + if startY == 0: + startY = startY - first_index + f[f >= 0] += startY startY += f.shape[1] datalist.append(f) -- GitLab