Example #1
0
    def update(self):
        """
            Update data members according to reduction results
        """
        if IS_IN_MANTIDPLOT:
            from mantid import PropertyManagerDataService
            from reduction_workflow.command_interface import ReductionSingleton
            property_manager_name = ReductionSingleton().get_reduction_table_name()
            property_manager = PropertyManagerDataService.retrieve(property_manager_name)
            if property_manager.existsProperty("LatestBeamCenterX"):
                self.x_position = property_manager.getProperty("LatestBeamCenterX").value
            if property_manager.existsProperty("LatestBeamCenterY"):
                self.y_position = property_manager.getProperty("LatestBeamCenterY").value

            if self.use_sample_beam_center:
                self.flood_x_position = self.x_position
                self.flood_y_position = self.y_position
            elif self.sensitivity_corr:
                if property_manager.existsProperty("SensitivityBeamCenterXUsed"):
                    self.flood_x_position = property_manager.getProperty("SensitivityBeamCenterXUsed").value
                else:
                    self.flood_x_position = self.x_position
                if property_manager.existsProperty("SensitivityBeamCenterYUsed"):
                    self.flood_y_position = property_manager.getProperty("SensitivityBeamCenterYUsed").value
                else:
                    self.flood_y_position = self.y_position
    def update(self):
        """
            Update data members according to reduction results
        """
        if IS_IN_MANTIDPLOT:
            from mantid import PropertyManagerDataService
            from reduction_workflow.command_interface import ReductionSingleton
            property_manager_name = ReductionSingleton().get_reduction_table_name()
            property_manager = PropertyManagerDataService.retrieve(property_manager_name)
            if property_manager.existsProperty("LatestBeamCenterX"):
                self.x_position = property_manager.getProperty("LatestBeamCenterX").value
            if property_manager.existsProperty("LatestBeamCenterY"):
                self.y_position = property_manager.getProperty("LatestBeamCenterY").value

            if self.use_sample_beam_center:
                self.flood_x_position = self.x_position
                self.flood_y_position = self.y_position
            elif self.sensitivity_corr:
                if property_manager.existsProperty("SensitivityBeamCenterXUsed"):
                    self.flood_x_position = property_manager.getProperty("SensitivityBeamCenterXUsed").value
                else:
                    self.flood_x_position = self.x_position
                if property_manager.existsProperty("SensitivityBeamCenterYUsed"):
                    self.flood_y_position = property_manager.getProperty("SensitivityBeamCenterYUsed").value
                else:
                    self.flood_y_position = self.y_position
Example #3
0
 def update(self):
     """
         Update data member from reduction output
     """
     if IS_IN_MANTIDPLOT:
         from mantid import PropertyManagerDataService
         from reduction_workflow.command_interface import ReductionSingleton
         property_manager_name = ReductionSingleton().get_reduction_table_name()
         property_manager = PropertyManagerDataService.retrieve(property_manager_name)
         if property_manager.existsProperty("MeasuredBckTransmissionValue"):
             self.bck_transmission = property_manager.getProperty("MeasuredBckTransmissionValue").value
         if property_manager.existsProperty("MeasuredBckTransmissionError"):
             self.bck_transmission_spread = property_manager.getProperty("MeasuredBckTransmissionError").value