예제 #1
0
    # PLOT HISTOGRAMA

    fig = fig + 1
    figure(fig)

    v_datos = zeros((size(types), size(L_OII_noext)))
    # sin atenuar
    v_datos[0, :] = L_OII_noext

    for j in range(size(L_OII_noext)):

        attenuation_disc = att_Cal_1(waveA, Mcold_disc[j], rhalf_mass_disc[j],
                                     Z_disc[j])

        # atenuación en el continuo
        v_datos[1, j] = att_Cal_2(v_datos[0, j], attenuation_disc, 1)
        # atenuación con factor de Saito
        v_datos[2, j] = att_Cal_2(v_datos[0, j], attenuation_disc,
                                  5 / (redshift + 2.2))

    for i in range(size(types)):
        H, bins_edges = histogram(v_datos[i], bins=vbins)
        y = log10(H / (vol * dl))

        plot(lhist, y, linestyle=lines[i], label=types[i])

    leg = plt.legend(loc=0)

    # PLOT DATOS EXPERIMENTALES

    errorbar(ox, oy, Merror, fmt='o', color='grey', capsize=2)
예제 #2
0
# v_datos es una matriz que guardará todos los tipos de luminosidades
v_datos = zeros((size(types), size(L_Ha_noext)))

v_datos[0, :] = L_Ha_noext  # sin atenuar
v_datos[1, :] = L_Ha_ext  # atenuado por Millenium

for j in range(size(L_Ha_noext)):

    attenuation_disc_Cal = att_Cal_1(waveA, Mcold_disc[j], rhalf_mass_disc[j],
                                     Z_disc[j])
    attenuation_disc_Car = att_Car_1(waveA, Mcold_disc[j], rhalf_mass_disc[j],
                                     Z_disc[j])

    # atenuación en el continuo
    v_datos[2, j] = att_Cal_2(v_datos[0, j], attenuation_disc_Cal, 1)
    v_datos[3, j] = att_Car_2(v_datos[0, j], attenuation_disc_Car, 1)

for i in range(size(types)):
    H, bins_edges = histogram(v_datos[i], bins=vbins)
    y = log10(H / (vol * dl))

    plot(lhist, y, color=colors[i], label=types[i])

leg = plt.legend(loc=0)

# PLOT DATOS EXPERIMENTALES: no hay

title('z = %.2f' % redshift)

if unitsh:
         linestyle='solid',
         label='z = %.2f' % redshift)

    leg = plt.legend(loc=0)

    ###############################################################################

    figure(2)  # Atenuación por Calzetti

    for j in range(size(L_OII_noext)):

        attenuation_disc_Cal = att_Cal_1(waveA, Mcold_disc[j],
                                         rhalf_mass_disc[j], Z_disc[j])

        # atenuación en el continuo
        v_datos[2, j] = att_Cal_2(v_datos[0, j], attenuation_disc_Cal, 1)
        v_datos[3, j] = att_Cal_2(v_datos[0, j], attenuation_disc_Cal,
                                  5 / (redshift + 2.2))  # con Saito

    H, bins_edges = histogram(v_datos[2], bins=vbins)
    y = log10(H / (vol * dl))
    plot(lhist,
         y,
         color=colors[i],
         linestyle='solid',
         label='z = %.2f' % redshift)

    H, bins_edges = histogram(v_datos[3], bins=vbins)
    y = log10(H / (vol * dl))
    plot(lhist,
         y,