From 29c0ea488fb6430b3119f3f67a2a5920c434ce9a Mon Sep 17 00:00:00 2001 From: Hal Simpson <hasimpson@usgs.gov> Date: Wed, 1 Jul 2015 00:11:24 -0600 Subject: [PATCH] Added check to make certain there's real data to output --- geomagio/edge/EdgeFactory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/geomagio/edge/EdgeFactory.py b/geomagio/edge/EdgeFactory.py index af00ee061..795eb2ebf 100644 --- a/geomagio/edge/EdgeFactory.py +++ b/geomagio/edge/EdgeFactory.py @@ -604,6 +604,10 @@ class EdgeFactory(TimeseriesFactory): stream = self._convert_stream_to_masked(timeseries=timeseries, channel=channel) + # Make certain there's actually data + if not numpy.ma.any(stream.select(channel=channel)[0].data): + return + for trace in stream.select(channel=channel).split(): trace_send = trace.copy() trace_send.trim(starttime, endtime) -- GitLab