Skip to content
Snippets Groups Projects

add satpy to our buildbucket

Merged Nick Bearson requested to merge nickb-add-satpy-PR into master
1 file
+ 11
2
Compare changes
  • Side-by-side
  • Inline
@@ -5,7 +5,7 @@ parse_desc = """Grid the past X minutes of GLM flash data, given a single input
"""
import numpy as np
from datetime import datetime
from datetime import datetime, timedelta
import os
import sys
import tempfile
@@ -111,7 +111,16 @@ def get_start_end(filenames, start_time=None, end_time=None):
filename_starts = [info[3] for info in filename_infos]
filename_ends = [info[4] for info in filename_infos]
start_time = min(filename_starts)
end_time = max(filename_ends)
# Used to use max(filename_ends), but on 27 Oct 2020, the filename
# ends started to report the time of the last event in the file,
# causing a slight leakage (usually less than a second) into the
# next minute. This caused two minutes of grids to be produced for every
# three twenty second files passed to this script.
# Instead, we now assume every LCFA file is 20 s long, beginning with
# the start time. No doubt in the future we will see filenames that no
# longer start on an even minute boundary.
end_time = max(filename_starts) + timedelta(0, 20)
if start_time is None or end_time is None:
raise ValueError("Could not determine start/end time")
Loading