\chapter{XSTAR output}
\label{sec:output}

The primary format of output data for XSTAR is FITS.  The files 
generated by a typical XSTAR run are described below.

Users of version 1 will recognize that the freedom to choose the output 
format has been eliminated in the interests of simplicity.  The most important 
physical quantities, such as line and continuum luminosities, ion abundances, 
and temperature are output automatically to fits files.  In addition, a 
concise summary of the radial temperature and ionization structure is output
to both the screen and a log file.  The user has the freedom to select an 
additional detailed fits output of level populations by setting an input switch.

\section{The Spectral Data File: xout\_spect1.fits}

The continuum luminosities and optical depths are printed in columns to 
this ascii fits file.  For each energy channel we
print: channel index, energy (eV), transmitted and reflected luminosity 
(in units of 10$^{38}$ erg s$^{-1}$ erg$^{-1}$) with lines binned and 
added to the continuum.  New in version 2.2 is the inclusion of a column which 
is just the flux scattered in resonant lines.  The final two columns are  optical 
depth in the forward and backward directions (see Chapter~\ref{sec:physics} for a 
more detailed description of the meaning of these quantities).  

\section{The Continuum  File: xout\_cont1.fits}

The continuum luminosities and optical depths are printed in columns to 
this ascii fits file.  For each energy channel we
print: channel index, energy (eV), transmitted and reflected luminosity 
(in units of 10$^{38}$ erg s$^{-1}$ erg$^{-1}$), and optical 
depth in the forward and backward directions. In this file lines are not
added to the continuum (new in version 2.1).

\section{The Line Lumnosity  File: xout\_lines1.fits}

The luminosities and optical depths of the 500 strongest emission lines 
are printed in columns to 
this ascii fits file.  For each line we
print: line index, wavelength ($\AA$), ion, lower level, upper level, reflected and transmitted 
luminosity (in units of 10$^{38}$ erg s$^{-1}$), and optical 
depth in the forward and backward directions (new in version 2.1). 

\section{The Abundances Data File: xout\_abund1.fits}

Print ion abundances and heating and cooling rates in an ascii fits file. 
For each ion with 
fractional abundance (relative to its parent element) greater than 
10$^{-10}$ the following information is printed: ion index, ion name,
fractional abundance (relative to the relevant elemental abundance),
abundance (relative to the total hydrogen abundance), and that ion's 
contributions to heating and cooling rates (in erg cm$^{-3}$ s$^{-1}$).  
The elements are ordered by increasing nuclear charge, ions by increasing 
free charge. Also printed are the Compton and total
heating rates, and bremsstrahlung, Compton, and total cooling rates 
(in erg cm$^{-3}$ s$^{-1}$).  This information is saved at every spatial zone
and printed out when the model is complete.  A second extension onto this file 
contains the column densities of the ions at the completion of the model.

\section{Detailed Ionic Information: xout\_detail.fits}

Print all level populations and continuum emissivities
for all spatial zones to an ascii fits file.
This file is large and time-consuming to view and 
manipulate, and is only produced if the hidden 
parameter write\_switch is set to 1.


\section{Detailed Line Information: xout\_detal2.fits}

Print all line emissivities
for all spatial zones to an ascii fits file.
This file is large and time-consuming to view and 
manipulate, and is only produced if the hidden 
parameter write\_switch is set to 1  (new in version 2.1).

\subsection{XSTAR Run Log: xout\_step.log} 

Print input parameters, and a log of the 
temperature and other useful quantities
(radius, $\Delta R/R$ the fractional distance from the illuminated cloud face, 
column density,  ionization parameter,
electron fraction,  proton number density, temperature, 
fractional heating-cooling rates, continuum 
optical depth at the Lyman continuum in the transmitted and reflected 
directions, and  the number of iterations required to reach thermal equilibrium.
This is the same as the information printed to 
the screen.  In addition, at the end of a model calculation the luminosities
of the 1000 strongest lines are printed, sorted by luminosity, along with the 
energy budget: total energy absorbed, emitted in the continuum, emitted in lines, and 
the fractional difference between the first quantity and the sum of the latter two. 
Models with energy budget errors greater than a few percent should likely be rerun 
with smaller value of emult.





