Changes from 0.5.0 -> 0.6.0
Fri 2016-09-02

Version 0.6.0 is mostly a bug fix release, but removes some depricated functions.

Labplot: fixes for POLARMESH, TOSCA, asymmetric widths, 
Fixes for current and future numpy releases
find_closed_orbit() can do extra_iterations to improve accuracy beyond the tolerance
More robust error output from Line.run()
TOSCA element, update options
gcp: get_phase_space, get_cell_properties_nonperiodic
Results object now has access for impdev files
Many small fixes

For full changes see http://pyzgoubi.bzr.sf.net/bzr/ or run:
bzr log --include-merges -r tag:pyzgoubi-0.5.0..tag:pyzgoubi-0.6.0

It is recommended that pyzgoubi 0.6.0 is used with Zgoubi 6.0.1, though almost all functionality works with Zgoubi back to 5.1.0

Changes from 0.4.1 -> 0.5.0
Thu 2015-03-26

Version 0.5.0 is a major release. It introduces some changes that make break scripts written for the 0.4.x versions.

New features and changes
Get cell properties (gcp) module, contains functions for quick analysis of a periodic cell.
Lab Plot module, for making plots in lab coordinates
Element definitions are processed at install time not runtime
Fixes for running on Windows and Mac OS
Improve reliability of closed orbit search
Fix file parsing when zgoubi gives oddly formatted exponents (eg 1.5741247399232311-101)
Negation operator reverse a line (and some elements)
Removed some deprecated functions
Error message improvements
get_twiss_profiles improvements
Many small fixes

This version of PyZgoubi has been tested with Zgoubi 5.1.0 through to current development versions SVN 535. Some features (binary IO do not work with 5.1.0 or older svn versions without patches listed below). To build a recent development version automatically use the command:
pyzgoubi --install-zgoubi

For full changes see http://pyzgoubi.bzr.sf.net/bzr/ or run:
bzr log --include-merges -r tag:pyzgoubi-0.4.1..tag:pyzgoubi-0.5.0


Changes from 0.4.0 -> 0.4.1
Tue Nov  1 12:15:19 GMT 2011

This release contains a years worth of updates for 0.4. It introduces a few new features, but should not break compatibility with 0.4.0

New Features
Add command to build a binary of Zgoubi, pyzgoubi --install-zgoubi
New Bunch methods: RMS widths, twiss and emittance. Get raw particle array
Function to find transfer matrix from start and end bunch, and twiss from transfer matrix
Adding and multiplication of Lines
DIPOLE, YMY elements
Small improvements to zgoubi --help, --version
Specify tick marks in plot_data_xy_multi

Internal
Optimise binary file writing
Allow use of binary files in track_bunch() (requires patch to zgoubi from zgoubi bug tracker)

Fixes
Warnings for potential problems in a bunch, and other places
Better handling of lost particle in track bunch
KV bunch generation
Some path related fixes and debug info
Fix spelling of emittance in function names


For full changes see http://pyzgoubi.bzr.sf.net/bzr/ or run:
bzr log --include-merges -r tag:pyzgoubi-0.4.0..tag:pyzgoubi-0.4.1


Changes from 0.3.1 -> 0.4.0
Wed Jun  2 18:09:23 BST 2010

This is intended to be the stable version that can be used for the EMMA online model.

New Features:
* --zgoubi option, to choose a zgoubi binary for pyzgoubi and run_tests.py
* More tests
* New CHANGREF, CAVITE option 7, CHAMBR, SPNTRK
* get_twiss_profiles() can now work with fai files as well as plt
* Read new style zgoubi output
* Introduce bunch object (see docs), and Results.get_bunch()
* scaling_to_poly()
* Direct tracking of a bunch, Line.track_bunch() (see docs) 
* Multithreaded bunch tracking, Line.track_bunch_mt() (see docs)
* find_closed_orbit_range() like find_closed_orbit() but can has search for a stable orbit over range.
* Improve documentation
* --debug option to show more info when running

Internal:
* Use getopts for commandline parsing
* Move some functions to using numpy arrays
* Improve errors using logging library
* Move all the cleaning from Line to Results
* Use sphinx to build docs

Fixes:
* Lots of code cleanup (pylint is a handy tool)
* Removed some old code, and deprecated some more. 
* Paths on windows (hopefully)

Known problems
* JAERI.py test will fail with Zgoubi 5.1.0 and older due to a bug in Zgoubi. This is fixed in Zgoubi SVN r237
* Binary file reading for Zgoubi 5.1.0 is broken. The new formats in Zgoubi SVN r251 and above works.
* OBJET_bunch is broken with ZGOUBI SVN r256 and above.
* You may see messages like "Exception exceptions.AttributeError: "'NoneType' object has no attribute
'error'" in <bound method Popen.__del__ of <subprocess.Popen object at
0x8a2596c>> ignored". This is a bug in python, but is harmless to pyzgoubi. http://bugs.python.org/issue5099

For full changes see http://pyzgoubi.bzr.sf.net/bzr/ or run:
bzr log --include-merges -r tag:pyzgoubi-0.3.1..tag:pyzgoubi-0.4.0


Changes from 0.3.0 -> 0.3.1
Mon Jan 11 12:57:56 GMT 2010
New Features
* use symlinks (if possible) instead of copies for add_input_files. should be faster for big files
* Allow adding lines to lines
* Can use -line to get the reversed line. (eg line.add(sec1, sec2, -sec3, sec4) or rline = -line )
* scan_dynamic_aperture
* misalign_element
* In def fourier_tune, allow input of coords 
* Fix legend parameter and add legend_location parameter to plot_data_xy_multi

Fixes
* Possible cygwin fixes (Not fully tested, probably best to run in native python on windows)
* Allow converting T and kGauss both directions
* Fixes to plot_data_xy_multi, scan_dynamic_aperture

See http://pyzgoubi.bzr.sf.net/bzr/ for full changes.

Changes 0.2.3 -> 0.3.0
Infrastructure changes:
* Moved code to sourceforge with bzr for revision control.
* The custom install is gone, and replaced with the standard python tools (install with "./setup.py install")
* Added some tests (do "./run_tests.py" in the source directory).

New features:
* Some command line options
	pyzgoubi --version
	pyzgoubi --help
	pyzgoubi --help elements
	pyzgoubi --help quadrupo
* Simple mode which acts on a default line to save a bit of typing, see docs
* Spin tracking
* emittance_to_coords()
* get_twiss_profiles()
* scaling_to_dipole()
* plot_data_xy_multi()
* DIPOLES element
* BestCircle code to find smallest circle enclosing an ellipse, from J. Scott Berg

Several bug fixes

Note: binary fai reading does not yet work with Zgoubi 5.1 (the format changed since 5.0)



Changes 0.2.2 -> 0.2.3
* Reading of binary fai files, use get_all(file='bfai')
* Twiss profile function from David
* Disable sorting by D in OBJET2, can be enabled with .sorted=True
	Makes it easier to keep track of which particle is which, but sorting is needed to group particles by energy, which is what zgoubi asks for. 
* Increase precision of floats in .dat file.
* Move the res(), res_fh(), save_res() etc functions to RESULTS object
* silence option to Line.run() to redirected zgoubi output to files
* Results.get_all() on FAI file gives -1 for X.
* Fix install update on Ubuntu

Changes 0.2.1 -> 0.2.2
* Fix reading plt with get_all()

Changes 0.2.0 -> 0.2.1
* Improve error message when writing defs
* Fix Line.full_tracking()
* Improve messages when run without an input file
* Include some changes from David Kelliher that got missed from 0.2
* More documentation
