1
1
# Mantid Repository : https://github.com/mantidproject/mantid
2
2
#
3
- # Copyright © 2023 ISIS Rutherford Appleton Laboratory UKRI,
3
+ # Copyright © 2025 ISIS Rutherford Appleton Laboratory UKRI,
4
4
# NScD Oak Ridge National Laboratory, European Spallation Source,
5
5
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6
6
# SPDX - License - Identifier: GPL - 3.0 +
@@ -56,12 +56,31 @@ def __init__(self):
56
56
self .initial_polarization = None
57
57
58
58
59
+ class StateField (metaclass = JsonSerializable ):
60
+ sample_strength_log : None | str
61
+ sample_direction_log : None | str
62
+
63
+ sample_direction_a : None | int
64
+ sample_direction_p : None | int
65
+ sample_direction_d : None | int
66
+
67
+ def __init__ (self ):
68
+ super (StateField , self ).__init__ ()
69
+ self .sample_strength_log = None
70
+ self .sample_direction_log = None
71
+ self .sample_direction_a = None
72
+ self .sample_direction_p = None
73
+ self .sample_direction_d = None
74
+
75
+
59
76
class StatePolarization (metaclass = JsonSerializable ):
60
77
flipper_configuration : None | str
61
78
spin_configuration : None | str
62
79
flippers : list [StateComponent ]
63
80
polarizer : None | StateFilter
64
81
analyzer : None | StateFilter
82
+ magnetic_field : None | StateField
83
+ electric_field : None | StateField
65
84
66
85
def __init__ (self ):
67
86
super (StatePolarization , self ).__init__ ()
@@ -70,3 +89,5 @@ def __init__(self):
70
89
self .analyzer = None
71
90
self .polarizer = None
72
91
self .flippers = []
92
+ self .magnetic_field = None
93
+ self .electric_field = None
0 commit comments