Beispiel #1
0
        a_array = simulate.triangle_bump(t, peak_t0, peak_t1, peak_max)

        peak_t0 = 9.0
        peak_t1 = 12.0
        peak_max = 3.0
        a_array = a_array + simulate.triangle_bump(t, peak_t0, peak_t1,
                                                   peak_max)

        peak_t0 = 12.0
        peak_t1 = 15.0
        peak_max = 2.0
        a_array = a_array + simulate.triangle_bump(t, peak_t0, peak_t1,
                                                   peak_max)
        acum_array = a_array.cumsum()

        o_array, h_array, v_array = simulate.run_fly_trap_model(
            foh, fhv, fvh, a_array)

        a_array_w_noise = a_array + noise_level * numpy.random.randn(
            num_step) * a_array.max()
        o_array_w_noise = o_array + noise_level * numpy.random.randn(
            num_step) * o_array.max()
        h_array_w_noise = h_array + noise_level * numpy.random.randn(
            num_step) * h_array.max()
        v_array_w_noise = v_array + noise_level * numpy.random.randn(
            num_step) * v_array.max()

        count_begin = 0.0
        count_final = h_array[-1] + v_array[-1]
        print(count_begin, count_final)

        end_dt = 10.0
Beispiel #2
0
    peak_t1 = 7.0
    peak_max = 3.0
    a_array  = triangle_bump(t,peak_t0,peak_t1,peak_max)

    peak_t0 = 9.0
    peak_t1 = 12.0
    peak_max = 3.0
    a_array  = a_array + triangle_bump(t,peak_t0,peak_t1,peak_max)

    peak_t0 = 12.0
    peak_t1 = 15.0
    peak_max = 2.0
    a_array  = a_array + triangle_bump(t,peak_t0,peak_t1,peak_max)


    o_array, h_array, v_array = run_fly_trap_model(foh, fhv, fvh, a_array) 

    a_array_w_noise = a_array + noise_level*numpy.random.randn(num_step)*a_array.max()
    o_array_w_noise = o_array + noise_level*numpy.random.randn(num_step)*o_array.max()
    h_array_w_noise = h_array + noise_level*numpy.random.randn(num_step)*h_array.max()
    v_array_w_noise = v_array + noise_level*numpy.random.randn(num_step)*v_array.max()

    count_begin = 0.0
    count_final = h_array[-1] + v_array[-1]
    print(count_begin, count_final)

    end_dt = 10.0
    end_mask = t > t_end - end_dt
    count_final = h_array_w_noise[end_mask].mean() + v_array_w_noise[end_mask].mean()

    print(count_begin, count_final)