Skip to content

Commit 1efc957

Browse files
committed
added meta field
1 parent 15dd156 commit 1efc957

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

turn_by_turn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"Read and write turn-by-turn measurement files from different particle accelerator formats."
99
)
1010
__url__ = "https://github.com/pylhc/turn_by_turn"
11-
__version__ = "0.9.1"
11+
__version__ = "0.10.0"
1212
__author__ = "pylhc"
1313
__author_email__ = "[email protected]"
1414
__license__ = "MIT"

turn_by_turn/structures.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import pandas as pd
2020

2121

22-
@dataclass
22+
@dataclass(slots=True)
2323
class TransverseData:
2424
"""
2525
Object holding measured turn-by-turn data for both transverse planes in the form of pandas DataFrames.
@@ -39,7 +39,7 @@ def __getitem__(self, item): # to access X and Y like one would with a dictiona
3939
return getattr(self, item)
4040

4141

42-
@dataclass
42+
@dataclass(slots=True)
4343
class TrackingData:
4444
"""
4545
Object holding multidimensional turn-by-turn simulation data in the form of pandas DataFrames.
@@ -68,7 +68,7 @@ def __getitem__(self, item): # to access fields like one would with a dictionar
6868
DataType = TransverseData | TrackingData
6969

7070

71-
@dataclass
71+
@dataclass(slots=True)
7272
class TbtData:
7373
"""
7474
Object holding a representation of a Turn-by-Turn data measurement. The date of the measurement,
@@ -79,6 +79,7 @@ class TbtData:
7979
date: datetime = None # will default in post_init
8080
bunch_ids: list[int] = None # will default in post_init
8181
nturns: int = None
82+
meta: dict | None = None
8283
nbunches: int = field(init=False)
8384

8485
def __post_init__(self):

0 commit comments

Comments
 (0)