Ejemplo n.º 1
0
def corr_cpl_evolution(
    energy,
    time,
    peak_flux,
    ep_start,
    ep_tau,
    emin,
    emax,
    alpha,
    redshift,
    Nrest,
    gamma,
):

    N = time.shape[0]
    M = energy.shape[0]

    a = 10.
    b = 1e4

    out = np.empty((N, M))

    for n in range(N):

        ep = ep_decay(time[n], t_start=0.0, ep_start=ep_start, ep_tau=ep_tau)

        F = golenetskii_corr(ep, Nrest=Nrest, gamma=gamma, z=redshift)

        for m in range(M):
            out[n, m] = cpl(energy[m], alpha=alpha, xp=ep, F=F, a=a, b=b)

    return out
Ejemplo n.º 2
0
def cpl_evolution(energy, time, peak_flux, ep, alpha, emin, emax, z):
    """
    evolution of the CPL function with time

    :param energy:
    :param time:
    :param peak_flux:
    :param ep_start:
    :param ep_tau:
    :param alpha:
    :param trise:
    :param tdecay:
    :param emin:
    :param emax:
    :returns:
    :rtype:

    """

    N = time.shape[0]
    M = energy.shape[0]

    a = 10 * (1 + z)
    b = 1e4 * (1 + z)

    out = np.empty((N, M))

    for n in range(N):
        for m in range(M):
            out[n, m] = cpl(energy[m] * (1 + z),
                            alpha=alpha,
                            xp=ep,
                            F=peak_flux,
                            a=a,
                            b=b)

    return out