Coronal plasma
In this example we calculated the emission from a plasma in
collisional ionization equilibrium at a temperature of 0.5 keV. Most
importantly, we set niter=-99 to hold the temperature constant
but ensure charge neutrality. We further set the ionization parameter
rlogxi to the minimum value of -10 so that the radiation field
becomes negligible.
xstar cfrac=1. rlogxi=-10 column=1e18 density=1e8 rlrad38=1e-6
temperature=5.8e2 spectrum='pow' trad=-1 abundtbl='xdef'
modelname='coronal' niter=0 npass=1 fabund=0 alabund=0 pabund=0
clabund=0 scabund=0 tiabund=0 vabund=0 crabund=0 mnabund=0
niabund=0 cuabund=0 znabund=0 ncn2=99999
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
17.00 -36.00 -10.00 -10.00 1.00 8.00 6.76 -99.99 0.00 -10.00 -10.00 0
17.00 -36.00 -10.00 -10.00 1.00 8.00 6.76 -99.99 -99.99 -10.00 -10.00 0
17.00 -7.00 18.00 -10.00 1.00 8.00 6.76 -99.99 -99.99 -6.65 -10.00 0
final print: 0
xstar: Prepping to write spectral data
xstar: Done writing spectral data
total time 1550.1273570153862
Next we plot the outward emission spectrum that features a very strong O VIII Lya line along with many Fe L lines.
>>> 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(500, 800)
>>> plt.ylim(1e9, 1e14)
>>> plt.show()