# Small improvements and modifications * `FreeSpaceCSR` and `ParallelPlatesCSR` now raise an explicit `ValueError` if the `time` array does not strictly include 0, instead of silently producing wrong wake potentials. Docstrings, tests and the `coherent_synchrotron_radiation.ipynb` example updated accordingly. * `WakePotential.reference_loss` no longer reports `Wlong` as a separate row when a `Wcsr` component is present, as both contributions are now combined into a single longitudinal loss factor. # Bugfix * Fix wrong sign of the monopolar wakes `Wxcst` and `Wycst` in `WakePotential`, which were convolved like `Wlong` instead of like the quadrupolar wakes. Positive constant wakes are now defocusing, in both `get_wakepotential` and `get_gaussian_wakepotential`. * Fix `WakePotential.reference_loss` when a `Wcsr` component is used: the CSR antiderivative convention requires a sign flip and the `Wlong` contribution has to be added before comparison with `Zlong.loss_factor`. * Fix `FreeSpaceCSR` and `ParallelPlatesCSR` giving wrong results, without any warning, when the `time` array does not contain 0 (e.g. an even-sized grid). * Fix `TransverseSpaceCharge` skipping the last longitudinal bin, leaving the particles of that slice without any kick. * Fix `TransverseMapSector._compute_chromatic_tune_advances` modifying `self.chro_diff` in place, so that its size was growing by two elements at each call. * Fix `Bunch.mp_number` setter re-initializing the bunch with `charge` instead of `current`, corrupting the bunch current when changing the number of macro-particles. * Fix `DirectFeedback.phase_shift` using a value cached at initialization: it is now a property, so it stays correct if the cavity resonance frequency is changed afterwards. * Fix `BunchSpectrumMonitor` save timing, which used `track_count` instead of the `save_count` counter. * Fix a (rare) plotting issue in `streak_bunchspectrum` and `streak_beamspectrum` due to numpy advanced indexing. * Fix `beam.filling_pattern[bn] is True` comparison in `Mpi.share_distributions`, which never matched for numpy booleans and prevented the filling pattern from being updated. # Authors who took part in this release Alexis Gamelin