예제 #1
0
import sys
import numpy as np
import astropy.units as u
import matplotlib.pyplot as plt

sys.path.append("../../")
from agnpy.targets import SphericalShellBLR, RingDustTorus

blr = SphericalShellBLR(1e46 * u.Unit("erg s-1"), 0.1, "Lyalpha", 1e17 * u.cm)
dt = RingDustTorus(1e46 * u.Unit("erg s-1"), 0.6, 1000 * u.K)
print(blr)
print(dt)

r = np.logspace(14, 21, 200) * u.cm

plt.loglog(r, blr.u(r), label="BLR")
plt.loglog(r, dt.u(r), label="Torus")
plt.xlabel(r"$r\,/\,{\rm cm}$")
plt.ylabel(r"$u\,/\,({\rm erg}\,{\rm cm}^{-3})$")
plt.legend()
plt.show()
예제 #2
0
파일: ec_gmax.py 프로젝트: jsitarek/agnpy
L_disk = 0.91e45 * u.Unit("erg s-1")
xi_dt = 0.6
T_dt = 100 * u.K
R_dt = 1.0e18 * u.cm
h = 0.01 * R_dt

## test with lower numbers, gives virtually the same
# B0/=10
# T_dt/=10
# L_disk/=100

blob1 = Blob(r0, z, delta_D, Gamma, B0, norm, spectrum_dict, xi=xi)
dt1 = RingDustTorus(L_disk, xi_dt, T_dt, R_dt=R_dt)

# energy density of DT radiation field in the blob
u_dt1 = dt1.u(h, blob1)
u_synch1 = blob1.u_ph_synch
print(
    "energy density in the blob, DT radiation: ",
    u_dt1,
    "synchrotron photons: ",
    u_synch1,
)
dt1_sed = dt1.sed_flux(nu, z)
# energy density was set to be the same

synch1 = Synchrotron(blob1, ssa=False)
synch1_sed = synch1.sed_flux(nu)

ssc1 = SynchrotronSelfCompton(blob1, synch1)
ssc1_sed = ssc1.sed_flux(nu)