Skip to content
Snippets Groups Projects
Commit b549277c authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

warn in history plot if state data is all nan

parent ff3930b9
No related branches found
No related tags found
No related merge requests found
import io
import sys
import logging
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as dates
import xml.etree.ElementTree as ET
......@@ -71,6 +73,8 @@ def plot_history(path, lookback='7 days ago', draw_segs=False):
channel += '.mean,s-trend'
bufs = data.nds_fetch([channel], gtmin(start), gtmin(end))
state_index, state_time = bufs[0].yt()
if np.all(np.isnan(state_index)):
logging.warning("state data [{}] is all nan??".format(channel))
# find events
events = list(find_events(after=start.gps()))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment