Skip to content

Commit abd462c

Browse files
committedFeb 20, 2025
Add new state to the AllStates Object
RE mantidproject#38524
1 parent 2a87466 commit abd462c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎scripts/SANS/sans/state/AllStates.py

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from sans.state.StateObjects.StateWavelength import StateWavelength
2828
from sans.state.StateObjects.state_instrument_info import StateInstrumentInfo
2929
from sans.state.StateObjects.StateBackgroundSubtraction import StateBackgroundSubtraction
30+
from sans.state.StateObjects.StatePolarization import StatePolarization
3031
from sans.state.automatic_setters import automatic_setters
3132

3233

@@ -51,6 +52,7 @@ def __init__(self):
5152
self.convert_to_q: StateConvertToQ = StateConvertToQ()
5253
self.compatibility: StateCompatibility = StateCompatibility()
5354
self.background_subtraction: StateBackgroundSubtraction = StateBackgroundSubtraction()
55+
self.polarization: StatePolarization = StatePolarization()
5456

5557
def validate(self):
5658
is_invalid = dict()
@@ -78,6 +80,8 @@ def validate(self):
7880
is_invalid.update("State: The state object needs to include a StateConvertToQ object.")
7981
if not self.background_subtraction:
8082
is_invalid.update("State: The state object needs to include a StateBackgroundSubtraction object.")
83+
if not self.polarization:
84+
is_invalid.update("State: The state object needs to include a StatePolarization object.")
8185

8286
# We don't enforce a compatibility mode, we just create one if it does not exist
8387
if not self.compatibility:

0 commit comments

Comments
 (0)
Please sign in to comment.