From 32fdc5389091dcabd04d728698bc9e0e5335e3f4 Mon Sep 17 00:00:00 2001 From: Gamelin Alexis <alexis.gamelin@synchrotron-soleil.fr> Date: Fri, 5 May 2023 17:07:37 +0200 Subject: [PATCH] Improve representations for Bunch and Beam classes --- mbtrack2/tracking/particles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mbtrack2/tracking/particles.py b/mbtrack2/tracking/particles.py index 7a4c9e7..a7ddf85 100644 --- a/mbtrack2/tracking/particles.py +++ b/mbtrack2/tracking/particles.py @@ -160,7 +160,7 @@ class Bunch: def __repr__(self): """Return representation of alive particles""" - return f'{pd.DataFrame(self[:])!r}' + return f'Bunch with macro-particles: \n {pd.DataFrame(self[:])!r}' @property def mp_number(self): @@ -583,7 +583,7 @@ class Beam: def __repr__(self): """Return representation of the beam filling pattern""" - return f'{list((self.filling_pattern))!r}' + return f'Beam with bunch current:\n {list((self.bunch_current))!r}' @property def not_empty(self): -- GitLab