The procedure for doing this is as follows:
a) You must have xstar version 2.2 installed, either as standalone or as part of the heasoft distribution. Earlier versions cannot be used to generate population files for use by warmabs and photemis.
b) Using xstar version 2.2, run a variation of the constant density sphere described in the manual chapter 2, with low density and low luminosity so that the sphere is optically thin. warmabs and photemis treat the ionization parameter as the free parameter describing level populations, so it is desirable that the model run in xstar be optically thin, and that it span the range of ionization parameter of interest. An example of the xstar command run from the command line is:
xstar cfrac=0. temperature=10000. pressure=0.03 density=10000. spectrum='pow' trad=-1. rlrad38=1.e-10 column=1.e+17 rlogxi=5. lcpres=0 habund=1. heabund=1. cabund=1. nabund=1. oabund=1. neabund=1. mgabund=1. siabund=1. sabund=1. arabund=1. caabund=1. feabund=1. niabund=0. modelname="otfs" niter=99 npass=1 critf=1.e-7 nsteps=10 xeemin=0.04 emult=0.1 taumax=50. lprint=1 lwrite=1
and an example of the xstar.par file which could be used instead is:
cfrac,r,a,1,0.,1.,"covering fraction" temperature,r,a,10000,0.,1.e4,"temperature (/10**4K)" lcpres,i,a,0,0,1,"constant pressure switch (1=yes, 0=no)" pressure,r,a,0.03,0.,1.,"pressure (dyne/cm**2)" density,r,a,1.e+4,0.,1.e18,"density (cm**-3)" spectrum,s,a,"pow",,,"spectrum type?" spectrum_file,s,a,"spct.dat",,,"spectrum file?" spectun,i,a,0,0,1,"spectrum units? (0=energy, 1=photons)" trad,r,a,-1,,,"radiation temperature or alpha?" rlrad38,r,a,1.00E-015,0.,1.e10,"luminosity (/10**38 erg/s)" column,r,a,1.00E+016,0.,1.e25,"column density (cm**-2)" rlogxi,r,a,5,-10.,+10.,"log(ionization parameter) (erg cm/s)" habund,r,a,1,0.,100.,"hydrogen abundance" heabund,r,a,1,0.,100.,"helium abundance" liabund,r,h,0,0.,100.,"lithium abundance" beabund,r,h,0,0.,100.,"beryllium abundance" babund,r,h,0,0.,100.,"boron abundance" cabund,r,a,1,0.,100.,"carbon abundance" nabund,r,a,1,0.,100.,"nitrogen abundance" oabund,r,a,1,0.,100.,"oxygen abundance" fabund,r,a,1,0.,100.,"fluorine abundance" neabund,r,a,1,0.,100.,"neon abundance" naabund,r,a,1,0.,100.,"sodium abundance" mgabund,r,a,1,0.,100.,"magnesium abundance" alabund,r,a,1,0.,100.,"aluminum abundance" siabund,r,a,1,0.,100.,"silicon abundance" pabund,r,a,1,0.,100.,"phosphorus abundance" sabund,r,a,1,0.,100.,"sulfur abundance" clabund,r,a,1,0.,100.,"chlorine abundance" arabund,r,a,1,0.,100.,"argon abundance" kabund,r,a,1,0.,100.,"potassium abundance" caabund,r,a,1,0.,100.,"calcium abundance" scabund,r,a,1,0.,100.,"scandium abundance" tiabund,r,a,1,0.,100.,"titanium abundance" vabund,r,a,1,0.,100.,"vanadium abundance" crabund,r,a,1,0.,100.,"chromium abundance" mnabund,r,a,1,0.,100.,"manganese abundance" feabund,r,a,1,0.,100.,"iron abundance" coabund,r,a,1,0.,100.,"cobalt abundance" niabund,r,a,1,0.,100.,"nickel abundance" cuabund,r,a,1,0.,100.,"copper abundance" znabund,r,a,1,0.,100.,"zinc abundance" modelname,s,a,"otfs",,,"model name" 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,2,"print switch (1=yes, 0=no)" lstep,i,h,0,,,"step size choice switch" 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-7,1.e-24,0.1,"critical ion abundance" vturbi,r,h,1.,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" loopcontrol,i,h,0,0,30000,"loop control (0=standalone)" npass,i,h,1,1,10000,"number of passes" mode,s,h,"ql",,,"mode"
It is important to have the write switch set to 1 in order to generate the file containing the level populations at each step.
In doing this, you may want to change the shape of the ionizing spectrum. In these examples it is a power law with =2, which is the same as what is used in the distributed warmabs/photemis package. The maximum ionization parameter is controlled by the value of the variable rlogxi, in this case it is 5, corresponding to =1.e5. The minimum ionization parameter is set by the column density of the model; this input file will terminate when log() falls below -2. The number of intermediate steps is controlled by the variable nsteps; in this case nsteps=6 corresponds to a uniform spacing of 0.13 in log(). If the final model has more than 200 spatial zones, warmabs and photemis will discard any populations for spatial zones beyond 200.
c) After the run is complete, the populations are in the file xout_detail.fits. This must be moved to the directory containing the xstar data files, i.e. the directory pointed to by the WARMABS_DATA environment variable, and then pointed to by the WARMABS_POP environment variable. Then warmabs and photemis will read populations from this file. The file lmodel.dat, as it is distributed, contains limits on the ionization parameter which may not be appropriate to your file pops.fits, so you may want to change this.