Marginally Compton thick slab, reflection and transmission
In this example we compare reflection and transmission from a
marginally Compton-thick slab. It requires the cfrac parameter
to be set to zero. This example further illustrates a multi-pass
run. We set exclude some trace elements. This run can take a few
hours to finish. Runtime may be reduced by lowering the spectral
resolution ncn2 and the number of elements.
xstar cfrac=0. rlogxi=3 column=5e23 density=1e12 rlrad38=1e-1
temperature=1. spectrum='pow' trad=-1 abundtbl='xdef'
modelname='relf-trans' niter=99 npass=5 fabund=0 alabund=0 pabund=0
clabund=0 scabund=0 tiabund=0 vabund=0 crabund=0 mnabund=0
niabund=0 cuabund=0 znabund=0
xstar version 2.59cj
pass number= 1 -1
log(r) delr/r log(N) log(xi) x_e log(n) log(t) h-c(%) h-c(%) log(tau)
fwd rev
11.00 -36.00 -10.00 3.00 1.21 12.00 6.29 0.00 0.00 -10.00 -10.00 40
11.00 -36.00 -10.00 3.00 1.21 12.00 6.29 0.00 1.09 -10.00 -10.00 1
11.06 -0.87 22.19 2.87 1.21 12.00 5.91 0.01 1.26 -1.90 -10.00 9
[...]
pass number= 2 1
log(r) delr/r log(N) log(xi) x_e log(n) log(t) h-c(%) h-c(%) log(tau)
fwd rev
11.78 -0.08 23.70 1.45 1.10 12.00 4.01 0.02 -0.02 0.85 -10.00 9
11.77 -0.08 23.69 1.45 1.10 12.00 4.45 0.12 -0.06 0.83 -0.11 22
11.77 -0.08 23.69 1.45 1.10 12.00 4.43 0.19 0.22 0.82 -0.09 24
[...]
pass number= 5 -1
log(r) delr/r log(N) log(xi) x_e log(n) log(t) h-c(%) h-c(%) log(tau)
fwd rev
11.00 -36.00 -10.00 3.00 1.21 12.00 5.84 -0.06 0.00 -10.00 0.06 9
11.00 -36.00 -10.00 3.00 1.21 12.00 5.84 -0.06 1.87 -10.00 0.05 9
11.06 -0.87 22.19 2.87 1.21 12.00 5.70 0.00 2.13 -1.90 0.05 10
[...]
Note how the temperature change in the first and fifth pass at the same ionization parameter. Now we compare the reflected (inward emitted) and transmitted (outward emitted) spectra.
>>> 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.plot(spec['energy'], spec['emit_inward'])
>>> plt.xscale("log")
>>> plt.yscale("log")
>>> plt.xlabel("Energy [eV]")
>>> plt.ylabel("Flux")
>>> plt.xlim(100, 10000)
>>> plt.ylim(1e0, 1e10)
>>> plt.show()