next up previous contents
Next: WARMABS Up: Examples Previous: Example 2: Photoionized Grid   Contents

Example 3: Photoionized Grid; Exploring the T-$\xi $ Plane

In this example a grid of photoionization models is calculated each with fixed ionization parameter and temperature. The column densities are all small, so that each model is effectively optically thin and isothermal. The output of these models which is of interest is in the ascii file xstar2xspec.log, and this file can be parsed to extract quantities such as heating and cooling rates vs. xi and T. The ionizing spectrum is a power law with index -1. The xstinitable.par file which produces this is:

cfrac,r,h,1.,0.,1.,"covering fraction soft maximum"
cfractyp,i,h,0,0,2,"covering fraction variation type"
cfracint,i,h,1,0,1,"covering fraction interpolation type"
cfracsof,r,h,0.,0.,1.,"covering fraction soft minimum"
cfracnst,i,h,1,1,20,"covering fraction number of steps"
temperature,r,h,1000.,0.3,1.E4,"temperature soft maximum (/10**4K)"
temperaturetyp,i,h,2,0,2,"temperature variation type"
temperatureint,i,h,1,0,1,"temperature interpolation type"
temperaturesof,r,h,1.,0.,1.,"temperature soft minimum"
temperaturenst,i,h,10,1,20,"temperature number of steps"
pressure,r,h,0.03,0.00000001,1.,"pressure soft maximum (dyne/cm**2)"
pressuretyp,i,h,0,0,2,"pressure variation type"
pressureint,i,h,1,0,1,"pressure interpolation type"
pressuresof,r,h,1.e-9,1.e-10,1.,"pressure soft minimum"
pressurenst,i,h,1,1,20,"pressure number of steps"
density,r,h,1.E+12,1.e+4,1.E21,"density soft maximum (cm**-3)"
densitytyp,i,h,0,0,2,"density variation type"
densityint,i,h,1,0,1,"density interpolation type"
densitysof,r,h,1e10,1.e+4,1.e+18,"density soft minimum"
densitynst,i,h,1,1,20,"density number of steps"
trad,r,h,-1.,,,"radiation temperature or alpha soft maximum?"
tradtyp,i,h,0,0,2,"radiation temperature variation type"
tradint,i,h,1,0,1,"radiation temperature interpolation type"
tradsof,r,h,0.,0.,1.,"radiation temperature soft minimum"
tradnst,i,h,1,1,20,"radiation temperature number of steps"
rlrad38,r,h,1.e+6,1.e-20,1.E10,"luminosity soft maximum (/10**38 erg/s)"
rlrad38typ,i,h,0,0,2,"luminosity variation type"
rlrad38int,i,h,1,0,1,"luminosity interpolation type"
rlrad38sof,r,h,1e1,1.e-23,1.e+10,"luminosity soft minimum"
rlrad38nst,i,h,1,1,20,"luminosity number of steps"
column,r,h,1.e+10,1.e+10,1.E25,"column density soft maximum (cm**-2)"
columntyp,i,h,0,0,2,"column density variation type"
columnint,i,h,1,0,1,"column density interpolation type"
columnsof,r,h,1.E+10,1.,1.E25,"column density soft minimum"
columnnst,i,h,1,1,20,"column density number of steps"
rlogxi,r,h,5.,-10.,+10.,"log(ionization parameter) soft maximum (erg cm/s)"
rlogxityp,i,h,2,0,2,"log(ionization parameter) variation type"
rlogxiint,i,h,0,0,1,"log(ionization parameter) interpolation type"
rlogxisof,r,h,1.,-10.0,+10.0,"log(ionization parameter) soft minimum"
rlogxinst,i,h,10,1,20,"log(ionization parameter) number of steps"
habund,r,h,1.,0.,100.,"hydrogen abundance soft maximum"
habundtyp,i,h,0,0,2,"hydrogen abundance variation type"
habundint,i,h,1,0,1,"hydrogen abundance interpolation type"
habundsof,r,h,0.,0.,1.,"hydrogen abundance soft minimum"
habundnst,i,h,1,1,20,"hydrogen abundance number of steps"
heabund,r,h,1.,0.,100.,"helium abundance soft maximum"
heabundtyp,i,h,0,0,2,"helium abundance variation type"
heabundint,i,h,1,0,1,"helium abundance interpolation type"
heabundsof,r,h,0.,0.,1.,"helium abundance soft minimum"
heabundnst,i,h,1,1,20,"helium abundance number of steps"
liabund,r,h,0.,0.,100.,"lithium abundance soft maximum"
liabundtyp,i,h,0,0,2,"lithium abundance variation type"
liabundint,i,h,1,0,1,"lithium abundance interpolation type"
liabundsof,r,h,0.,0.,1.,"lithium abundance soft minimum"
liabundnst,i,h,1,1,20,"lithium abundance number of steps"
beabund,r,h,0.,0.,100.,"beryllium abundance soft maximum"
beabundtyp,i,h,0,0,2,"beryllium abundance variation type"
beabundint,i,h,1,0,1,"beryllium abundance interpolation type"
beabundsof,r,h,0.,0.,1.,"beryllium abundance soft minimum"
beabundnst,i,h,1,1,20,"beryllium abundance number of steps"
babund,r,h,0.,0.,100.,"boron abundance soft maximum"
babundtyp,i,h,0,0,2,"boron abundance variation type"
babundint,i,h,1,0,1,"boron abundance interpolation type"
babundsof,r,h,0.,0.,1.,"boron abundance soft minimum"
babundnst,i,h,1,1,20,"boron abundance number of steps"
cabund,r,h,1.,0.,100.,"carbon abundance soft maximum"
cabundtyp,i,h,0,0,2,"carbon abundance variation type"
cabundint,i,h,1,0,1,"carbon abundance interpolation type"
cabundsof,r,h,0.,0.,1.,"carbon abundance soft minimum"
cabundnst,i,h,1,1,20,"carbon abundance number of steps"
nabund,r,h,1.,0.,100.,"nitrogen abundance soft maximum"
nabundtyp,i,h,0,0,2,"nitrogen abundance variation type"
nabundint,i,h,1,0,1,"nitrogen abundance interpolation type"
nabundsof,r,h,0.,0.,1.,"nitrogen abundance soft minimum"
nabundnst,i,h,1,1,20,"nitrogen abundance number of steps"
oabund,r,h,1.,0.,100.,"oxygen abundance soft maximum"
oabundtyp,i,h,0,0,2,"oxygen abundance variation type"
oabundint,i,h,1,0,1,"oxygen abundance interpolation type"
oabundsof,r,h,0.,0.,1.,"oxygen abundance soft minimum"
oabundnst,i,h,1,1,20,"oxygen abundance number of steps"
fabund,r,h,0.,0.,100.,"fluorine abundance soft maximum"
fabundtyp,i,h,0,0,2,"fluorine abundance variation type"
fabundint,i,h,1,0,1,"fluorine abundance interpolation type"
fabundsof,r,h,0.,0.,1.,"fluorine abundance soft minimum"
fabundnst,i,h,1,1,20,"fluorine abundance number of steps"
neabund,r,h,1.,0.,100.,"neon abundance soft maximum"
neabundtyp,i,h,0,0,2,"neon abundance variation type"
neabundint,i,h,1,0,1,"neon abundance interpolation type"
neabundsof,r,h,0.,0.,1.,"neon abundance soft minimum"
neabundnst,i,h,1,1,20,"neon abundance number of steps"
naabund,r,h,0.,0.,100.,"sodium abundance soft maximum"
naabundtyp,i,h,0,0,2,"sodium abundance variation type"
naabundint,i,h,1,0,1,"sodium abundance interpolation type"
naabundsof,r,h,0.,0.,1.,"sodium abundance soft minimum"
naabundnst,i,h,1,1,20,"sodium abundance number of steps"
mgabund,r,h,1.,0.,100.,"magnesium abundance soft maximum"
mgabundtyp,i,h,0,0,2,"magnesium abundance variation type"
mgabundint,i,h,1,0,1,"magnesium abundance interpolation type"
mgabundsof,r,h,0.,0.,1.,"magnesium abundance soft minimum"
mgabundnst,i,h,1,1,20,"magnesium abundance number of steps"
alabund,r,h,0.,0.,100.,"aluminium abundance soft maximum"
alabundtyp,i,h,0,0,2,"aluminium abundance variation type"
alabundint,i,h,1,0,1,"aluminium abundance interpolation type"
alabundsof,r,h,0.,0.,1.,"aluminium abundance soft minimum"
alabundnst,i,h,1,1,20,"aluminium abundance number of steps"
siabund,r,h,1.,0.,100.,"silicon abundance soft maximum"
siabundtyp,i,h,0,0,2,"silicon abundance variation type"
siabundint,i,h,1,0,1,"silicon abundance interpolation type"
siabundsof,r,h,0.,0.,1.,"silicon abundance soft minimum"
siabundnst,i,h,1,1,20,"silicon abundance number of steps"
pabund,r,h,0.,0.,100.,"phosphorus abundance soft maximum"
pabundtyp,i,h,0,0,2,"phosphorus abundance variation type"
pabundint,i,h,1,0,1,"phosphorus abundance interpolation type"
pabundsof,r,h,0.,0.,1.,"phosphorus abundance soft minimum"
pabundnst,i,h,1,1,20,"phosphorus abundance number of steps"
sabund,r,h,1.,0.,100.,"sulfur abundance soft maximum"
sabundtyp,i,h,0,0,2,"sulfur abundance variation type"
sabundint,i,h,1,0,1,"sulfur abundance interpolation type"
sabundsof,r,h,0.,0.,1.,"sulfur abundance soft minimum"
sabundnst,i,h,1,1,20,"sulfur abundance number of steps"
clabund,r,h,0.,0.,100.,"chlorine abundance soft maximum"
clabundtyp,i,h,0,0,2,"chlorine abundance variation type"
clabundint,i,h,1,0,1,"chlorine abundance interpolation type"
clabundsof,r,h,0.,0.,1.,"chlorine abundance soft minimum"
clabundnst,i,h,1,1,20,"chlorine abundance number of steps"
arabund,r,h,1.,0.,100.,"argon abundance soft maximum"
arabundtyp,i,h,0,0,2,"argon abundance variation type"
arabundint,i,h,1,0,1,"argon abundance interpolation type"
arabundsof,r,h,0.,0.,1.,"argon abundance soft minimum"
arabundnst,i,h,1,1,20,"argon abundance number of steps"
kabund,r,h,0.0,0.,100.,"potassium abundance soft maximum"
kabundtyp,i,h,0,0,2,"postassium abundance variation type"
kabundint,i,h,1,0,1,"postassium abundance interpolation type"
kabundsof,r,h,0.,0.,1.,"postassium abundance soft minimum"
kabundnst,i,h,1,1,20,"postassium abundance number of steps"
caabund,r,h,1.,0.,100.,"calcium abundance soft maximum"
caabundtyp,i,h,0,0,2,"calcium abundance variation type"
caabundint,i,h,1,0,1,"calcium abundance interpolation type"
caabundsof,r,h,0.,0.,1.,"calcium abundance soft minimum"
caabundnst,i,h,1,1,20,"calcium abundance number of steps"
scabund,r,h,0.,0.,100.,"scandium abundance soft maximum"
scabundtyp,i,h,0,0,2,"scandium abundance variation type"
scabundint,i,h,1,0,1,"scandium abundance interpolation type"
scabundsof,r,h,0.,0.,1.,"scandium abundance soft minimum"
scabundnst,i,h,1,1,20,"scandium abundance number of steps"
tiabund,r,h,0.,0.,100.,"titanium abundance soft maximum"
tiabundtyp,i,h,0,0,2,"titanium abundance variation type"
tiabundint,i,h,1,0,1,"titanium abundance interpolation type"
tiabundsof,r,h,0.,0.,1.,"titanium abundance soft minimum"
tiabundnst,i,h,1,1,20,"titanium abundance number of steps"
vabund,r,h,0.,0.,100.,"vanadium abundance soft maximum"
vabundtyp,i,h,0,0,2,"vanadium abundance variation type"
vabundint,i,h,1,0,1,"vanadium abundance interpolation type"
vabundsof,r,h,0.,0.,1.,"vanadium abundance soft minimum"
vabundnst,i,h,1,1,20,"vanadium abundance number of steps"
crabund,r,h,0.,0.,100.,"chromium abundance soft maximum"
crabundtyp,i,h,0,0,2,"chromium abundance variation type"
crabundint,i,h,1,0,1,"chromium abundance interpolation type"
crabundsof,r,h,0.,0.,1.,"chromium abundance soft minimum"
crabundnst,i,h,1,1,20,"chromium abundance number of steps"
mnabund,r,h,0.,0.,100.,"manganese abundance soft maximum"
mnabundtyp,i,h,0,0,2,"manganese abundance variation type"
mnabundint,i,h,1,0,1,"manganese abundance interpolation type"
mnabundsof,r,h,0.,0.,1.,"manganese abundance soft minimum"
mnabundnst,i,h,1,1,20,"manganese abundance number of steps"
feabund,r,h,1.,0.,100.,"iron abundance soft maximum"
feabundtyp,i,h,0,0,2,"iron abundance variation type"
feabundint,i,h,1,0,1,"iron abundance interpolation type"
feabundsof,r,h,0.1,0.,1.,"iron abundance soft minimum"
feabundnst,i,h,0,1,20,"iron abundance number of steps"
coabund,r,h,0.,0.,100.,"cobalt abundance soft maximum"
coabundtyp,i,h,0,0,2,"cobalt abundance variation type"
coabundint,i,h,1,0,1,"cobalt abundance interpolation type"
coabundsof,r,h,0.,0.,1.,"cobalt abundance soft minimum"
coabundnst,i,h,1,1,20,"cobalt abundance number of steps"
niabund,r,h,0.,0.,100.,"nickel abundance soft maximum"
niabundtyp,i,h,0,0,2,"nickel abundance variation type"
niabundint,i,h,1,0,1,"nickel abundance interpolation type"
niabundsof,r,h,0.,0.,1.,"nickel abundance soft minimum"
niabundnst,i,h,1,1,20,"nickel abundance number of steps"
cuabund,r,h,0.,0.,100.,"copper abundance soft maximum"
cuabundtyp,i,h,0,0,2,"copper abundance variation type"
cuabundint,i,h,1,0,1,"copper abundance interpolation type"
cuabundsof,r,h,0.,0.,1.,"copper abundance soft minimum"
cuabundnst,i,h,1,1,20,"copper abundance number of steps"
znabund,r,h,0.,0.,100.,"zinc abundance soft maximum"
znabundtyp,i,h,0,0,2,"zinc abundance variation type"
znabundint,i,h,1,0,1,"zinc abundance interpolation type"
znabundsof,r,h,0.,0.,1.,"zinc abundance soft minimum"
znabundnst,i,h,1,1,20,"zinc abundance number of steps"
spectrum,s,h,"pow",,,"spectrum type?"
spectrum_file,s,h,"bknpw5",,,"spectrum file?"
spectun,i,h,0,0,1,"spectrum units? (0=energy, 1=photons)"
redshift,i,h,1,0,1,"Is redshift a parameter? (0=no, 1=yes)"
nsteps,i,h,3,1,1000,"number of steps"
niter,i,h,0,,,"number of iterations"
lwrite,i,h,0,0,1,"write switch (1=yes, 0=no)"
lprint,i,h,0,0,1,"print switch (1=yes, 0=no)"
lstep,i,h,0,,,"step size choice switch"
npass,i,h,1,1,10000,"number of passes"
lcpres,i,h,0,0,1,"constant pressure switch (1=yes, 0=no)"
emult,r,h,0.5,1.e-6,1.e+6,"Courant multiplier"
taumax,r,h,5.,1.,10000.,"tau max for courant step"
xeemin,r,h,0.1,1.e-6,0.5,"minimum electron fraction"
critf,r,h,1.e-4,1.e-24,0.1,"critical ion abundance"
vturbi,r,h,300.,0.,30000.,"turbulent velocity (km/s)"
radexp,r,h,0.,-3.,3.,"density distribution power law index"
ncn2,i,h,999,999,99999,"number of continuum bins"
modelname,s,h,"template",,,"model name"
loopcontrol,i,h,0,0,30000,"loop control (0=standalone)"
elow,r,h,1.0E+2,0.,5.11E+5,"energy band low end (eV)"
ehigh,r,h,2.0E+4,0.,5.11E+5,"energy band high end (eV)"
mode,s,h,"ql",,,"mode"

A very simple Python script which parses this file and prints out the values of log(xi), T, httot, cltot, is:

#!/usr/bin/python
import sys
WANTED=11
a=[]
with open('xstar2xspec.log', 'r') as inF:
  for line in inF:
    left,sep,right = line.partition(' log(xi)=')
    if sep: 
       atmp=float(right[:WANTED])
       a.append(atmp)
    left,sep,right = line.partition(' log(xi)=')
    if sep: 
       atmp=float(right[:WANTED])
       a.append(atmp)
    left,sep,right = line.partition('httot=')
    if sep: 
       atmp=float(right[:WANTED])
       a.append(atmp)
    left,sep,right = line.partition('cltot=')
    if sep: 
       atmp=float(right[:WANTED])
       a.append(atmp)
       print " ".join('%0.2f' % item for item in a)
       a=[]

This can be used to make figures such as this:

Figure 9: Figure showing contours of constant heating - cooling in the (T-$\xi $) plane for an illuminating spectrum which is a $\gamma$=2 power law. Equlibrium is shown as the solid curve. Figures such as this can be created using the input in this section.
\begin{figure}
\epsfxsize =5.6in % narrow the plot\epsfysize =7.0in % shorten the plot
\epsffile{f70a.ps}\end{figure}

next up previous contents
Next: WARMABS Up: Examples Previous: Example 2: Photoionized Grid   Contents
Tim Kallman 2015-07-28