Don't try to render timeseries which are too short
This commit is contained in:
parent
0595c19de9
commit
d6bdaa4128
|
@ -152,6 +152,8 @@ class TimeSeries(Widget):
|
|||
data = self.lts.data
|
||||
n = len(data)
|
||||
t_last = data[-1][0]
|
||||
if len(data) < 5:
|
||||
return "(not enough data)"
|
||||
dt = (t_last - data[-5][0]) / 4
|
||||
k = math.log((t_last - data[0][0]) / dt / n + 1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue