A feature added September 2007 is output of the strongest lines, sorted by element and ion into a common block called 'ewout' This feature is only available for the warmabs, photemis, hotemis, hotabs models (not windabs, or multabs). The contents of the common block are:
lmodtyp: identifies which model most recently put its output into the common block. lmodtyp=1,2,3,4, where 1=hotabs, 2=hotemis, 3=warmabs, 4=photemis
newout: number of lines in the list. This is zeroed after each call to warmabs, photemis, hotabs, etc.
lnewo: array conatining line indexes. These should correspod to the line indexes in the ascii line lists on the xstar web page.
kdewo: character array containing the name of the ion
kdewol: character array containing the name of the lower level
kdewou: character array containing the name of the upper level
aijewo: array containing A values for the lines
flinewo: array containing f values for the lines
ggloewo: array containing statistical weights for the lower levels
ggupewo: array containing statistical weights for the upper levels
elewo: array containing the line wavelengths
tau0ewo: array containing the line center depths
tau02ewo:array containing the line depths at the energy bin nearest to line center
ewout: array containing line equivalent widths in eV, negative values correspond to emission
elout: array containing line luminosities in xstar units (erg/s/1038)
The details of how to get at the contents of the common block are up to the user. Currently xspec does not have a mechanism to do this, but it is straightforward to write a small fortran code to call the models with suitable parameter values and print the common block from there. The calling sequence for an analytic model is described in the xspec manual. It is important to point out that the common block is overwritten at each call to one of the models, so it should be emptied by the calling program after each call to one of the models.
An example is as follows:
program fphottst
c
implicit none
c
real ear(0:20000),photar(20000),photer(10000),param(30)
integer ne,mm,ifl
real emin,emax,dele
c
ne=10000
emin=0.4
emax=7.2
dele=(emax/emin)**(1./float(ne-1))
ear(0)=emin
do mm=1,ne
ear(mm)=ear(mm-1)*dele
enddo
write (6,*)ear(1),ear(ne),ear(ne/2)
param(1)=2.
param(2)=-4.
param(13)=100.
param(12)=0.
param(3)=1.
param(4)=1.
param(5)=1.
param(6)=1.
param(7)=1.
param(8)=1.
param(9)=1.
param(10)=1.
param(11)=1.
param(3)=0.
call fhotabs(EAR,NE,PARAM,IFL,PHOTAR,PHOTER)
c
call commonprint
c
write (6,*)'after fwarmabs'
do mm=1,ne
write (6,*)ear(mm),photar(mm)/ear(mm)
enddo
c
stop
end
subroutine commonprint
c
implicit none !jg
c
parameter (nnnl=200000)
c
common /ewout/newout,lnewo(nnnl),kdewo(8,nnnl),
$ kdewol(20,nnnl),kdewou(20,nnnl),aijewo(nnnl),flinewo(nnnl),
$ ggloewo(nnnl),ggupewo(nnnl),
$ elewo(nnnl),tau0ewo(nnnl),tau02ewo(nnnl),ewout(nnnl),
$ elout(nnnl),lmodtyp
c
real aijewo,flinewo,ggloewo,ggupewo,elewo,tau0ewo,tau02ewo,
$ ewout,elout
integer lnewo,newout,lmodtyp
character*1 kdewo,kdewol,kdewou
integer kk,mm !jg
c
if (lmodtyp.eq.1) write (6,*)'after hotabs',newout
if (lmodtyp.eq.2) write (6,*)'after hotemis',newout
if (lmodtyp.eq.3) write (6,*)'after warmabs',newout
if (lmodtyp.eq.4) write (6,*)'after photemis',newout
write (16,*)'index, ion, wave(A), tau0, tau0grid, ew (eV),',
$ 'lum, lev\_low, lev\_up, a\_ij, f\_ij, g\_lo, g\_up'
do kk=1,newout
write (16,9955)kk,lnewo(kk),(kdewo(mm,kk),mm=1,8),
$ elewo(kk),tau0ewo(kk),tau02ewo(kk),ewout(kk),
$ elout(kk),
$ (kdewol(mm,kk),mm=1,20),(kdewou(mm,kk),mm=1,20),
$ aijewo(kk),flinewo(kk),ggloewo(kk),ggupewo(kk)
enddo
9955 format (1x,2i8,1x,8a1,5(1pe11.3),1x,2(20a1,1x),4(1pe11.3))
c
return
end
New in version 2.02: inclusion of continua, both in emission and absorption. Equivalent widths are not calculated, and quantities analogous to the transition probability and oscillator strength are not output. Also, the upper level, which may not be the ground level of the adjacent ion, is not identified.
New in version 2.03: Fix to error in normalization of voigt profile.
New in version 2.04: Rational and uniform level labels for all levels. These should now be unambiguous. A description is contained in the xstar manual. Also, the interface with the commonprint common block has been updated. There is now a (string) variable whiche denotes whether a transition is a line or rrc/edge. Upper levels for rrc/edges are denoted 'continuum' for the ground state of the next ion, or by the appropriate level string when the upper level is not the ground state.