Example of inelastic scattering tracking and analysis.
M. Borland (APS)

===
Files

PARPressure2015-11-11.sdds
        Pressure data for several species, provided by J. Carter (APS).
parTrack.lte
        Lattice file
run1.ele
        File to run elastic_scattering command

===
Sequence

* Run Pelegant to determine LMA
mpiexec -np 18 Pelegant run0.ele 
sddssort run0.mmap run0.mmap-sort -column=s

* Run Pelegant to model inelastic scattering
mpiexec -np 18 Pelegant run1.ele 

Output files
       run1.mag --- Magnet profile
       run1.twi --- Twiss parameters
       run1.islog --- Inelastic scattering log file
       run1.islos --- Inelastic scattering los record file
       run1.isout --- Inelastic scattering output (residual electrons) file

* Postprocess

inelasticScatteringAnalysis -tracking run1.islos -twiss run1.twi -output run1.isanal -pressure PARPressure2015-11-11.sdds -verbose 1 

Output files
       run1.isanal --- Main analysis file.
                   Has lifetime and total scattering rate parameters.
                   Also has total scattering rate from each scattering location
       run1.isanal.full --- Full analysis output
                   Has one page for each scattering location s, giving scattering coordinate (k), 
                   loss coordinates (xLost, yLost, deltaLost, sLost), and rate.
       run1.isanal.his --- Histogram of loss rates vs sLost

* Example plots and follow-on analysis
  * Add column with the log of the rate, then plot scattering amplitude k for each scattering location, color-coded by rate.
sddsprocess run1.isanal.full -define=col,logRate,"rate log"
sddsplot -col=s,k run1.isanal.full -split=col=logRate -order=temperature -graph=sym,vary=subtype,fill  

  * Plot lost distribution histogram and cumulative distribution function
sddsplot -col=sLost,frequency run1.isanal.his 
sddsplot -col=sLost,sLostCdf run1.isanal.his 

