Skip to content
# New features

## Intrabeam Scattering
* Implementation of IBS effect in mbtrack2, the `IntrabeamScattering` class was added in mbtrack2.tracking.ibs.
* It implements an approximate IBS kick based on an analytical model.
* Four analytical models are available: Piwinski Standard, Piwinski Modified, Completely Integrated Piwinski model, and Bane high-energy approximation. It is recommended to use Completely Integrated Piwinski model (CIMP) for fast simulations.

## Important behavior change in `Optics` class
* Default behavior of `Optics` is changed when AT lattice is loaded: now it defaults to optic function to s=0 instead of average ones.
* Default behavior of `LongRangeResistiveWall` and `ImpedanceModel` when an AT lattice is loaded is to normalized by `average_beta / local_beta`
* Adds `Optics.average_beta` attribute

## Nonlinear chromaticity
* `Synchrotron.get_chroma` can be used to compute nonlinear chromaticity from pyAT lattice.
* Nonlinear chromaticity can be used in `TransverseMap` and `TransverseSectorMap`.
* `TransverseMap` now inherits from `TransverseSectorMap`.

## `SynchrotronRadiation` object
* Adds a `SynchrotronRadiation.qexcitation` optional parameter to turn off quantum excitation.
* Improved performance.

# Other improvements and modifications
* General performance improvements in many classes.
* Update `CircularResistiveWall` class in resistive_wall.py to replace numerical integrations with analytical forms for improved performance.
* Use `scipy.integrate.trapezoid` for compatibility with newer version of numpy
* Update `BeamIonElement` to work in a more general case.
* Update `TransverseSpaceCharge` to work in a more general case.
* `ComplexData.name_and_coefficients_table` is now a staticmethod.
* Extend `WakeField` to "mixed" componenets (xydip, yxdip, ...).
* Small fix/improvements for rf.py (`CavityResonator` for n_bin=1)
* Add `Element.track_bunch_if_non_empty` decorator.
* Modify `Bunch.binning` to add a `return_full_length` optional parameter.
* Modify `Mpi.share_distributions` for n_bin=1.
* Modify `WakePotential` for n_bin=1 and use `track_bunch_if_non_empty` decorator.
* Modify `PhysicalModel` to return errors if needed.
* Adds `Beam.init_bunch_list_mpi`, a convenience method to initialize a beam using MPI parallelisation with a `Bunch` per core.

## Project management
* Add \> 400 tests and organize them in unit-tests and physics-tests.
* Add `assert_attr_changed` test function.
* renamed particles_electromagnetic_fields.py into emfields.py and changed all the imports
* added CODEOWNERS file for automatic review assignment for merge requests
* Update pyproject.toml and poetry.lock with pytest-mock

# Bugfix
* Fix `CavityResonator.is_CBI_stable`
* Fix quadrupolar wake potential sign
* Bugfixes with beam_ion_elements.py
* Fix adts in `TransverseMapSector`
* Fix `WakePotential.check_sampling`
* Fix `Sweep.plot`
* Fix `Monitor` sub-classes sometimes getting stuck when flushing data.
* Fix `generate_transverse_map_sector` functionality to deduce chromaticity from pyAT lattice.

# Authors who took part in this release
Alexis Gamelin, Vadim Gubaidulin, Keon Hee Kim, Watanyu Foosang, Teresia Olsson