def get_state_data(self, file_information): if file_information: data_builder = get_data_builder(SANSFacility.ISIS, file_information) return data_builder.build() else: return StateData()
def _get_data_state(**data_entries): state = StateData() data_settings = {"sample_scatter": "test", "sample_transmission": "test", "sample_direct": "test", "can_scatter": "test", "can_transmission": "test", "can_direct": "test"} for key, value in list(data_settings.items()): if key in data_entries: value = data_entries[key] if value is not None: # If the value is None, then don't set it setattr(state, key, value) return state
def __init__(self): super(AllStates, self).__init__() self.data : StateData = StateData() self.move: StateMove = StateMove() self.reduction: StateReductionMode = StateReductionMode() self.slice: StateSliceEvent = StateSliceEvent() self.mask: StateMask = StateMask() self.wavelength: StateWavelength = StateWavelength() self.save: StateSave = StateSave() self.scale: StateScale = StateScale() self.adjustment: StateAdjustment = StateAdjustment() self.convert_to_q: StateConvertToQ = StateConvertToQ() self.compatibility: StateCompatibility = StateCompatibility()