We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5c21d8 commit 63855d5Copy full SHA for 63855d5
src/atip/simulator.py
@@ -19,7 +19,7 @@ class LinoptType(StrEnum):
19
LINOPT6 = auto()
20
21
22
-@dataclass
+@dataclass(frozen=True)
23
class SimParams:
24
linopt: LinoptType = LinoptType.LINOPT6
25
emittance: bool = True
@@ -34,7 +34,7 @@ def __post_init__(self):
34
"Emittance and radiation calculations must be disabled when using "
35
f"{self.linopt}",
36
)
37
- if self.linopt == LinoptType.LINOPT6:
+ elif self.linopt == LinoptType.LINOPT6:
38
if not self.radiation and self.emittance:
39
raise ValueError(
40
"You cannot calculate emittance with radiation disabled",
0 commit comments