def test_step_function(): """Step function time series A 20 second time series in two distinct, 10 second ranges with one second increments. First period is a positive constant value. The second period is a different, positive constant value. """ values = [1.0] * 10 values += [2.0] * 10 graph = {'datapoints': time_values(values)} full_long = wordgraph.describe(datapoints) assert full_long is not None
def test_saw_tooth(): """A saw tooth time series A 25 second time series of 5 distinct periods. Each period exhibits the same monotonically increasing positive series. The series resets to the initial state on each section boundary. """ values = [1.0 + i for i in range(5)] values *= 5 values.append(1.0) graph = {'datapoints': time_values(values)} full_long = wordgraph.describe(datapoints) assert full_long is not None
def test_tent_map(): """Tent map time series A 20 second time series in two distinct, 10 second ranges with one second increments. First period is monotonically increasing. The second period is monotonically decreasing at the same rate. """ values = [float(i) for i in range(10)] values.append(11.0) values += [10.0 - i for i in range(10)] graph = {'datapoints': time_values(values)} full_long = wordgraph.describe(datapoints) assert full_long is not None
def test_monotonic_down_per_second(): "Monotonically descreasing positive series in 10, one second increments" graph = {'datapoints': time_values(10.0 - i for i in range(10))} full_long = wordgraph.describe(datapoints) assert full_long is not None
def test_linear_values(): "Postiive constant value time series in 10, one second increments" graph = {'datapoints': time_values(3.0 for i in range(10))} full_long = wordgraph.describe(datapoints) assert full_long is not None