def params_of_mean(value=array([-.005, 1.]), tau=.1, rate=4.):
    """
    Intercept and slope of rate stochastic of poisson distribution
    Rate stochastic must be positive for t in [0,T]

    p(intercept, slope|tau,rate) =
    N(slope|0,tau) Exp(intercept|rate) 1(intercept>0) 1(intercept + slope * T>0)
    """

    def logp(value, tau, rate):
        if value[1] > 0 and value[1] + value[0] * 110 > 0:
            return normal_like(value[0], 0., tau) + \
                exponential_like(value[1], rate)
        else:
            return -Inf

    def random(tau, rate):
        val = zeros(2)
        val[0] = rnormal(0., tau)
        val[1] = rexponential(rate)
        while val[1] < 0 or val[1] + val[0] * 110 <= 0:
            val[0] = rnormal(0., tau)
            val[1] = rexponential(rate)
        return val
Intercept and slope of rate stochastic of poisson distribution
    Rate stochastic must be positive for t in [0,T]

    p(intercept, slope|tau,rate) =
    N(slope|0,tau) Exp(intercept|rate) 1(intercept>0) 1(intercept + slope * T>0)