# Path: tests/context.py



import pprint
import numpy as np
import copy
import pdb
from .context import PROP_MC, PROP_MM



pp = pprint.PrettyPrinter(indent=4)


def kink(T, process_noise, obs_noise, xprev=None):
    if xprev is None:
        xprev = np.random.randn()
    y = np.zeros([T, ])
    x = np.zeros([T, ])
    xtrue = np.zeros([T, ])
    for t in range(T):
        if xprev < 4:
            fx = xprev + 1
        else:
            fx = -4 * xprev + 21

        xtrue[t] = fx

# Path: tests/context.py



# Path: tests/test_utils.py
import pprint
import numpy as np
import copy
import pdb
from .context import PROP_MC, PROP_MM




pp = pprint.PrettyPrinter(indent=4)


def kink(T, process_noise, obs_noise, xprev=None):
    if xprev is None:
        xprev = np.random.randn()
    y = np.zeros([T, ])
    x = np.zeros([T, ])
    xtrue = np.zeros([T, ])
    for t in range(T):
        if xprev < 4:
            fx = xprev + 1
        else:
            fx = -4 * xprev + 21

        xtrue[t] = fx

        x[t] = fx + np.sqrt(process_noise) * np.random.randn()