\chapter{Revisions}

\section{Version 2.1 (June 2000)}

$\bullet$ Added 5 new input parameters vturbi, emult, critd, taumax, xeemin.

$\bullet$ Added artificial broadening of absorption lines due to 
turbulent velocity controlled by input parameter vturbi.  If vturbi
is less than the local thermal ion speed, then thermal Doppler 
broadening is used.

$\bullet$ Changed input spectrum in default parameter file to pow.  
Added error check for invalid input spectrum.

$\bullet$ Fixed error which displayed incorrect value of 
the constant pressure switch in output files.

$\bullet$ Several minor errors have been corrected in the some of the 
calculations of atomic rates:  types 67, 51, and 70.

$\bullet$ Added printout of all line 
emissivities at each radial zone (in addition to the level populations) 
when the write\_switch parameter is set to 1.  These appear in the file 
named xout\_detal2.fits.

$\bullet$ Modified the algorithm for calculating thermal equilibrium
so that for temperatures less than 3030K the iteration procedure is 
disabled; any radius zone where the equilibrium solver finds a temperature
less than this value will not calculate thermal equlibrium.

$\bullet$ Added 2 new output fits files to the standard output.  xout\_lines.fits
contains the luminosities of the 100 strongest emission lines, and 
xout\_cont.fits contains the continuum luminosities without the lines added
(these two files can be combined by binning the lines suitably in order 
to make the contents of xout\_spect1.fits).

$\bullet$ Added calculation and printout of LTE level populations to the quantities
in xout\_detail.fits.

$\bullet$ Improved treament of energy budget, and added printout of energy budget 
to xout\_step.log.

\section{Version 2.1a (December 2000)}

$\bullet$ Fixed error in atomic rates affecting Fe XXI which caused
recombination rates to be too large.

$\bullet$ Streamlined calculation of photoionization and recombination 
rate quadratures.

\section{Version 2.1b (January 2001)}

$\bullet$ Added printout of line and recombination cooling rates to 
printout in log file.

\section{Version 2.1c (May 2001)}

$\bullet$ Fixed error in database which resulted in 
too large emission in some iron K$\beta$ fluorescence lines.

\section{Version 2.1d (May 2001)}

$\bullet$ Added feature which appends ion column densities 
in an additional extension to the xout\_abund1.fits file.

\section{Version 2.1e (June 2001)}

$\bullet$ Extended the energy range up to 1 MeV and added 
relativisitic Compton heating and cooling.

$\bullet$  Fixed error in calculating threshold energies 
of some excited levels from type 53 data.

$\bullet$  Fixed error in subroutine which creates blackbody spectra
which resulted in spuriously large fluxes at energies above 
50 keV.

\section{Version 2.1h (June 2002)}

$\bullet$ Relativistic corrections to Compton heating and cooling have been added,
using a procedure based on the work of Guilbert (1986).

$\bullet$ A new format for the storage of atomic data has been adopted, resulting in 
smaller files, and faster read times.  This change should be transparent to the 
user, except for considerable speeding of data loading and program startup. 

$\bullet$ A new algorithm for continuum transfer has been adopted, outward only 
transfer.  This gives better energy conservation overall.  A new column has been added
in the log file output, labeled `h-c', it tells the percent error in total energy conservation 
in the radiation field, i.e. total emitted - total absorbed.

$\bullet$ A new algorithm has been adopted for solving the statistical equilbrium,
in place of LU decomposition.  The algorithm involves an iterative solution to a 
simplified set of equations,  and is described by Lucy (2001). This change should result in
fast execution for models involving iron and other heavy elements, but will otherwise be 
transparent to the user.

$\bullet$ Various changes to atomic data, including increase in size of data file and 
addition of a new data type, for excitation of Fe XIX using data from Bhatia.

$\bullet$ Various minor inconsistencies and errors have been corrected, including 
spurious recombination emission to multiply excited levels.

$\bullet$ Standard output in the log file has been extended to include a list of the 
strongest absorption lines, and emission and absorption edges.

$\bullet$ Also, a new output file, xout\_rrc1.fits, is created which contains a fits format
list of the RRC strengths.


\section{Version 2.1j (September 2003)}

$\bullet$ New atomic data for iron K emission and absorption as described 
in Palmeri et al., 2004 A and A and references therein (see TK homepage 
for reprints). 

$\bullet$ Added n=2-3 iron UTA absorption using data from FAC (Gu 2003).

$\bullet$ Fixed bug which limited length of spectrum file name to 8 characters.

$\bullet$ Fixed bug which allowed buffer containing ion fractions vs. xi to overflow when 
the number of spatial zones exceeded 1000.  Now the limit on the number of spatial zones is 
3000, and the code stops with a message when this is exceeded.

$\bullet$ Added accurate Voigt profile calculations for all lines in synthetic spectra.

$\bullet$ Fixed bug which limited length of spectrum file name to 8 characters.

\section{Version 2.1k (May 2004)}

$\bullet$  Added printouts of level opacitites, and level populations to 
final printout if the print switch is set to 2.

$\bullet$  Added a column to the printout of the file xout\_detail.fits 
for the upp level index of each line.

$\bullet$  Repaired and streamlined the printing of the file xout\_detail.fits.

$\bullet$  Added more informative statement when the code stops because
the rate matrix overflows (ipmat too large).

$\bullet$  Added rate type 42: Auger decay

$\bullet$  Fixed arithmetic error which affected recombination rate calculation 
when kT $\>\>$ E$_{th}$

$\bullet$  Added new data type (85) for photoionization resonances below threshold,
along with new subroutine to calculate cross section (PEXS.f).

$\bullet$  Streamlined the photoionization rate calculation (phint53)

$\bullet$  More accurate treatment of line damping, Voigt profiles.

\section{Version 2.1kn3 (April 2005)}

$\bullet$ Two bugs were found in version 2.1k in the implementation of the Voigt function 
when calculating line absorption and the calculation of line broadening. 
The Voigt function bug affected primarily lines with small damping parameters, 
and resulted in non-fatal numerical errors in the xstar output absorption spectrum (INFs). 
When xstar was called as part of xstar2xspec this resulted in fatal errors 
because the cfitsio routines which read the xstar output could not interpret the INFs. 
The line broadening bug resulted in too large absorption line depths when turbulent 
broadening was important. Neither of these bugs affected the temperature, 
ionization balance or emission spectrum. The bugs have been repaired in version 2.1kn3. 

$\bullet$ Version 2.1kn3 also has an added feature, which is the addition of ion-by-ion 
heating and cooling rates as extensions to the output file xout\_abund1.fits.

$\bullet$ Also added is the capability to set the value of niter to a negative number, which 
allows the solution of charge conservation without solving thermal equilibrium.  As before, 
if niter=0 then neither charge transfer nor thermal equlibrium is calculated.

\section{Version 2.1kn4 (April 2005)}

$\bullet$ Fixed an error which causes the wrong inital radius to be calculated 
when the constant pressure is option is chosen.  Also changed the units
label on the ionization parameter to remove inconsistency with constant 
pressure case.

$\bullet$ Minor changes in the radiation transfer algorithm.

\section{Version 2.1kn5 (March (?) 2006)}

$\bullet$ Fixed bug which affected high ionization models which included 
nickel.  This caused segmentation faults, and was caused by an incorrect
data type flag in the atomic data for He-like Ni.

$\bullet$ Changed step size algorithm to prevent stepping beyond the 
column density specified in the input.  This will not be accurate 
for constant pressure clouds in which the temperature is changing 
rapidly.

\section{Version 2.1kn6 (June 2006)}

$\bullet$ Added the effect of photoionization and heating 
by line photons generated elsewhere in the cloud.  These are photons 
which have already escaped the local region close to the point of emission.

$\bullet$ Changed the step size computation algorithm in order 
to account for the process of emission.  That is, the step size is 
now is based on the length scale for significant change of both absorption 
and emission.

$\bullet$ Fixed several errors in the atomic database, notably affecting
N-like ions.  These affect some of the density sensitive lines in low ionization
models.

$\bullet$ Update to this manual, in the chapter in the Physics of xstar, 
describing in more detail the radiation transfer algorithm.


\section{Version 2.1kn7 (March 2007)}

$\bullet$ A bug has been found affecting the intensities of the He-like forbidden
lines from C, N, and O at high densities. 

\section{Version 2.1kn7 (December 2007)}

The xstar database has been updated to take into account the iron M shell 
UTA data of Gu et al., 2006, 641, 1227. A revised database file for use 
with xstar21kn7 is available from the xstar website.

\section{Version 2.1l}

Version 2.1l represents an update to the atomic data which includes 
the iron and oxygen inner shell data which was presented in 
 2004 Ap. J. Supp. 155, 675, along with the line data for iron 
from Chianti 5 and features from version 2.1kn6. Recent updates 
include fixes to buge in the routines associated with xstar2xspec. 
These caused numerical problems on 64 bit machines, and also resulted 
in errors when large grids of models were run.  Versions 2.1l, 2.1lnx, etc.
have not yet been completely tested and so 
have not been put into the standard release.

\section{Version 2.1ln3}

A bug has been found in version 2.1ln2 which affects the results in the 
paper 2004 Ap.J.Supp. 155 675. This is a bookkeeping error resulting in 
multiple-counting of the iron L shell cross section when calculating 
the cross sections for the 'third row' ions, Fe I -- VIII. This makes a 
quantitative change to the results in figures 4a and 13a. That is, it 
affects opacity due to iron above approximately 1 keV, only for low 
ionization models (log(xi)<0). These errors have been repaired in the 
version 2.1ln3, and repaired versions of the figures can be 
found on the xstar website.

\section{Version 2.1ln4}

Fixes to bugs in the routines associated with xstar2xspec. These caused 
numerical problems on 64 bit machines, and also resulted in errors when 
large grids of models were run (November 2007).

\section{Version 2.1ln5}

Incorporates the revised iron UTA data from Gu et al., 2006 (December 2007).

\section{Version 2.1ln6}

An update which implements strong typing to the fortran code.  Function and
results should be the same as previous versions.

\section{Version 2.1ln7}

Contains the dielectronic recombination rates for the ions of iron calculated 
by Badnell 2006 Ap. J. Lett. 651, 73.  These result in a qualitative change to
the ionization balance of iron for log($\xi$)$\leq$1.

\section{Version 2.1kn9/v2.1ln9 (November 2008)}

Treatment of line profiles both in absorption and emission has been 
redone.  Previously the profile function for each line was 
evaluated at the boundary of each energy bin.  Now each energy bin 
contains the integrated line luminosity (or optical depth) within 
that bin.  This will have a significant effect for lines which 
are narrower than the default bin spacing, which is approximately 350 km/s.
This affects outputs in the binned spectrum in xout\_spect1.fits.

\section{Version v2.1ln10 (May 2009)}

An error was found in the book keeping for some inner shell photoionization 
cross sections, resulting in double-counting in the opacity 
for some inner shell bound-free transions.  These affect primarily 
low ionization models, and do not affect Fe or O.  This has been fixed 
in this version of the code.  This does not affect version 2.1kn9 and 
previous.

\section{Version v2.1ln11 (May 2009)}

An error was found in the zeroing of one of the arrays used for 
zeroing an important matrix which is used in calculating level populations. 
This led to spurious emission in some fluorescence lines from low-medium 
ionization species of elements other than O or Fe, all
occuring in low-medium ionization models.  

\section{Version v2.2.0 (November 2009)}

This version includes the following added features:
(i) Inclusion of all elements up to Z=30.  The atomic data for the energy level 
structure of ions with 3 or more electrons for many of these are scaled 
hydrogenic and so the associated line emission must be treated with caution.
(ii) Inclusion of two new input parameters:  the radius exponent (radexp) and the 
number of continuum energy bind (ncn2).  These are described in the chapter on 
input to xstar. (iii) Inclusion of the radiation scattered in resonance 
lines as a column in the output fits file xout\_spect1.fits.  This is provided 
in the same units of specific luminosity  as the other columns. (iv) Use 
of a new algorithm for the multilevel calculation which is considerably faster 
and requires less storage.  Hence smaller values of critf (even 0) can 
be accomodated for  many problems.  (v) The input parameter critf now 
refers to the fractional ion abundance (i.e. relative to the parent element) 
rather than the absolute (i.e. relative to H) ion abundance.
(vi) Minor changes have been made to some of the output formats in the 
ascii file xout\_step.lis. (vii) The atomic data for dielectronic recombination has 
been changed to incorporate the results from Badnell and coworkers 
(http://amdpp.phys.strath.ac.uk/tamoc/DATA/RR/) in place 
of the rates from \cite{Aldrovandi73} and \cite{Arnaud92}.  
This has quantitative effects on  many of the results from xstar.  Notable is 
the effect on the ionization balance of iron for ionization parameters 
in the range 0 $\leq {\rm log}(\xi) \leq$ 2, where the m-shell ions dominate, and where
the new rates are greater than the previous ones by large factors.

\section{Version v2.2.1 (April 2010)}

Fixes to bugs which affected the length of the name of the spectrum file used when 
the 'file' input option is specified, and which affected the operation of multi-pass
runs.








