Broad emission line cloud and plot of simulated spectrum

In this example we model a quasar broad line cloud. This illustrates the use of constant pressure and a power law spectrum, with spectral index input in energy units. This run can take a few hours to finish. Runtime may be reduced by lowering the spectral resolution ncn2.

xstar cfrac=0. temperature=1 lcpres=1 pressure=0.03 density=1e10
spectrum='pow' trad=-0.9 rlrad38=1e8 column=1e23 rlogxi=0.2
abundtbl='xdef' modelname='quasar BLR cloud' ncn2=999999

We now look at the ion abundance of hydrogen and helium as a function of radius.

>>> import matplotlib.pyplot as plt
>>> from astropy.io import fits
>>> import numpy as np
>>>
>>> hdul= fits.open('files/xout_spect1.fits')
>>> spec=hdul[2].data
>>> hdul.close()
>>>
>>> plt.plot(spec['energy'], spec['emit_outward'])
>>> plt.xscale("log")
>>> plt.yscale("log")
>>> plt.xlabel("Energy [eV]")
>>> plt.ylabel("Flux")
>>> plt.xlim(100, 1000)
>>> plt.ylim(1e10, 1e19)
>>> plt.show()
../_images/BLR-broadand.png
>>> plt.plot(spec['energy'], spec['emit_outward'])
>>> plt.xscale("log")
>>> plt.yscale("log")
>>> plt.xlabel("Energy [eV]")
>>> plt.ylabel("Flux")
>>> plt.xlim(6000, 7000)
>>> plt.ylim(1e9, 1e17)
>>> plt.show()
../_images/BLR-FeKa.png