Example of iterating between ibsEmittance and haissinski to find equilibrium.
M. Borland, 2024.

basic.twi
        lattice functions for one sector of APS
iterateOnce
        Script to run ibsEmittance, then haissinski.

=== Example (converges in four steps)

# Initial run
$ iterateOnce 0
Running IBS with rf voltage
Running haissinski with IBS result
Printout for SDDS file twiss000.sdds

emitx (m) =  2.108675e-10  emity (m) =  2.108675e-11  Sdelta0 =    2.740921e-03

Printout for SDDS file hai000.sdds

SigmaZ (s) =  1.217131e-02

$ iterateOnce 1
Running IBS with Haissinki result hai000.sdds
New bunch length is 12.17130850106 mm
Running haissinski with IBS result
Printout for SDDS file twiss001.sdds

emitx (m) =  5.571003e-11  emity (m) =  5.571003e-12  Sdelta0 =    1.544743e-03

Printout for SDDS file hai001.sdds

SigmaZ (s) =  1.044230e-02

$ iterateOnce 2
Running IBS with Haissinki result hai001.sdds
New bunch length is 10.442303208879 mm
Running haissinski with IBS result
Printout for SDDS file twiss002.sdds

emitx (m) =  5.735989e-11  emity (m) =  5.735989e-12  Sdelta0 =    1.562669e-03

Printout for SDDS file hai002.sdds

SigmaZ (s) =  1.046143e-02

$ iterateOnce 3
Running IBS with Haissinki result hai002.sdds
New bunch length is 10.4614338393216 mm
Running haissinski with IBS result
Printout for SDDS file twiss003.sdds

emitx (m) =  5.730286e-11  emity (m) =  5.730286e-12  Sdelta0 =    1.562962e-03

Printout for SDDS file hai003.sdds

SigmaZ (s) =  1.046175e-02
