def doSuccessEvaluationIndexingMOSFLM(self, _edPlugin=None):
     EDVerbose.DEBUG("EDPluginControlCharacterisationv1_2.doSuccessEvaluationIndexingMOSFLM")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv1_2.doSuccessEvaluationIndexing")
     # Retrieve status messages (if any)
     if self.__edPluginExecEvaluationIndexingMOSFLM.hasDataOutput("statusMessageImageQualityIndicators"):
         self.addStatusMessage(self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("statusMessageImageQualityIndicators")[0].getValue())
     if self.__edPluginExecEvaluationIndexingMOSFLM.hasDataOutput("statusMessageIndexing"):
         self.addStatusMessage("MOSFLM: " + self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("statusMessageIndexing")[0].getValue())
     # Check if indexing was successful
     bIndexWithLabelit = False
     bIndexingSuccess = self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("indexingSuccess")[0].getValue()
     if bIndexingSuccess:
         xsDataIndexingResult = self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("indexingResult")[0]
         self.__xsDataIndexingResultMOSFLM = xsDataIndexingResult
         # Check if space group is P1 - if yes run Labelit indexing
         xsDataIndexingSolutionSelected = xsDataIndexingResult.getSelectedSolution()
         xsDataCrystal = xsDataIndexingSolutionSelected.getCrystal()
         xsDataSpaceGroup = xsDataCrystal.getSpaceGroup()
         strSpaceGroupName = xsDataSpaceGroup.getName().getValue().upper()
         # Check if MOSFLM has indexed in P1
         if strSpaceGroupName == "P1":
             # Check if the user maybe asked for P1!
             bIndexWithLabelit = True
             if self.__xsDataCollection.getDiffractionPlan() is not None:
                 if self.__xsDataCollection.getDiffractionPlan().getForcedSpaceGroup() is not None:
                     if self.__xsDataCollection.getDiffractionPlan().getForcedSpaceGroup().getValue().upper() == "P1":
                         EDVerbose.screen("P1 space forced by diffraction plan")
                         bIndexWithLabelit = False
         if bIndexWithLabelit:
             EDVerbose.screen("P1 space group choosed - reindexing with Labelit")
         else:
             EDVerbose.screen("MOSFLM indexing successful!")
             if self.__edPluginControlIndexingIndicators.hasDataOutput("indexingShortSummary"):
                 self.__strCharacterisationShortSummary += self.__edPluginControlIndexingIndicators.getDataOutput("indexingShortSummary")[0].getValue()
             # Generate prediction images
             xsDataCollection = self.__xsDataResultCharacterisation.getDataCollection()
             self.__xsDataResultCharacterisation.setIndexingResult(xsDataIndexingResult)
             xsDataGeneratePredictionInput = XSDataGeneratePredictionInput()
             xsDataGeneratePredictionInput.setDataCollection(XSDataCollection.parseString(xsDataCollection.marshal()))
             xsDataGeneratePredictionInput.setSelectedIndexingSolution(XSDataIndexingSolutionSelected.parseString(xsDataIndexingResult.getSelectedSolution().marshal()))
             self.__edPluginControlGeneratePrediction.setDataInput(xsDataGeneratePredictionInput)
             # Start the generation of prediction images - we synchronize in the post-process
             self.__edPluginControlGeneratePrediction.execute()
             # Then start the integration of the reference images
             self.indexingToIntegration()
     else:
         EDVerbose.screen("Indexing with MOSFLM failed!")
         bIndexWithLabelit = True
     if bIndexWithLabelit:
         # Execute Labelit indexing
         EDVerbose.screen("Now trying to index with Labelit - please be patient...")
         xsDataIndexingInput = XSDataIndexingInput()
         xsDataSubWedgeList = self.__xsDataCollection.getSubWedge()
         xsDataExperimentalCondition = xsDataSubWedgeList[0].getExperimentalCondition()
         xsDataIndexingInput.setDataCollection(self.__xsDataCollection)
         xsDataIndexingInput.setExperimentalCondition(xsDataExperimentalCondition)
         if self.__xsDataCrystal != None:
             xsDataIndexingInput.setCrystal(self.__xsDataCrystal)
         self.__edPluginControlIndexingLabelit.setDataInput(xsDataIndexingInput)
         self.__edPluginControlIndexingLabelit.executeSynchronous()
 def preProcess(self, _edObject=None):
     EDPluginControl.preProcess(self)
     self.DEBUG("EDPluginControlIndexingIndicatorsv1_1.preProcess")
     # Load and prepare the execution plugin
     self.edPluginIndexingLabelit = self.loadPlugin(self.strPluginIndexingLabelit)
     self.edPluginIndexingLabelit.setUseWarningInsteadOfError(True)
     xsDataIndexingInput = XSDataIndexingInput()
     xsDataIndexingInput.setDataCollection(self.getDataInput("dataCollection")[0])
     if self.hasDataInput("crystal"):
         xsDataIndexingInput.setCrystal(self.getDataInput("crystal")[0])
     if self.hasDataInput("refinedExperimentalCondition"):
         self.xsDataExperimentalCondition = self.getDataInput("refinedExperimentalCondition")[0]
     else:
         self.xsDataExperimentalCondition = self.getDataInput("dataCollection")[0].getSubWedge()[0].getExperimentalCondition()
     xsDataIndexingInput.setExperimentalCondition(self.xsDataExperimentalCondition)
     from EDHandlerXSDataPhenixv1_1 import EDHandlerXSDataPhenixv1_1
     xsDataInputLabelitIndexing = EDHandlerXSDataPhenixv1_1.generateXSDataInputLabelitIndexing(xsDataIndexingInput)
     self.edPluginIndexingLabelit.setDataInput(xsDataInputLabelitIndexing)
     #
     if self.bDoLabelitIndexing:
         if (self.getControlledPluginName("indicatorsPlugin") is not None):
             self.strControlledIndicatorsPluginName = self.getControlledPluginName("indicatorsPlugin")
     self.edPluginControlIndicators = self.loadPlugin(self.strControlledIndicatorsPluginName)
     # Extract the images from the data collections
     xsDataSubWedgeList = self.getDataInput("dataCollection")[0].getSubWedge()
     xsDataInputControlImageQualityIndicators = XSDataInputControlImageQualityIndicators()
     for xsDataSubWedge in xsDataSubWedgeList:
         xsDataImageList = xsDataSubWedge.getImage()
         for xsDataImage in xsDataImageList:
             xsDataInputControlImageQualityIndicators.addImage(xsDataImage)
     self.edPluginControlIndicators.setDataInput(xsDataInputControlImageQualityIndicators)
 def doSuccessEvaluationIndexingMOSFLM(self, _edPlugin=None):
     self.DEBUG("EDPluginControlCharacterisationv1_2.doSuccessEvaluationIndexingMOSFLM")
     self.retrieveSuccessMessages(_edPlugin, "EDPluginControlCharacterisationv1_2.doSuccessEvaluationIndexing")
     # Retrieve status messages (if any)
     if self.__edPluginExecEvaluationIndexingMOSFLM.hasDataOutput("statusMessageImageQualityIndicators"):
         self.addStatusMessage(self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("statusMessageImageQualityIndicators")[0].getValue())
     if self.__edPluginExecEvaluationIndexingMOSFLM.hasDataOutput("statusMessageIndexing"):
         self.addStatusMessage("MOSFLM: " + self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("statusMessageIndexing")[0].getValue())
     # Check if indexing was successful
     bIndexWithLabelit = False
     bIndexingSuccess = self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("indexingSuccess")[0].getValue()
     if bIndexingSuccess:
         xsDataIndexingResult = self.__edPluginExecEvaluationIndexingMOSFLM.getDataOutput("indexingResult")[0]
         self.__xsDataIndexingResultMOSFLM = xsDataIndexingResult
         # Check if space group is P1 - if yes run Labelit indexing
         xsDataIndexingSolutionSelected = xsDataIndexingResult.getSelectedSolution()
         xsDataCrystal = xsDataIndexingSolutionSelected.getCrystal()
         xsDataSpaceGroup = xsDataCrystal.getSpaceGroup()
         strSpaceGroupName = xsDataSpaceGroup.getName().getValue().upper()
         # Check if MOSFLM has indexed in P1
         if strSpaceGroupName == "P1":
             # Check if the user maybe asked for P1!
             bIndexWithLabelit = True
             if self.__xsDataCollection.getDiffractionPlan() is not None:
                 if self.__xsDataCollection.getDiffractionPlan().getForcedSpaceGroup() is not None:
                     if self.__xsDataCollection.getDiffractionPlan().getForcedSpaceGroup().getValue().upper() == "P1":
                         self.screen("P1 space forced by diffraction plan")
                         bIndexWithLabelit = False
         if bIndexWithLabelit:
             self.screen("P1 space group choosed - reindexing with Labelit")
         else:
             self.screen("MOSFLM indexing successful!")
             if self.__edPluginControlIndexingIndicators.hasDataOutput("indexingShortSummary"):
                 self.__strCharacterisationShortSummary += self.__edPluginControlIndexingIndicators.getDataOutput("indexingShortSummary")[0].getValue()
             # Generate prediction images
             xsDataCollection = self.__xsDataResultCharacterisation.getDataCollection()
             self.__xsDataResultCharacterisation.setIndexingResult(xsDataIndexingResult)
             xsDataGeneratePredictionInput = XSDataGeneratePredictionInput()
             xsDataGeneratePredictionInput.setDataCollection(XSDataCollection.parseString(xsDataCollection.marshal()))
             xsDataGeneratePredictionInput.setSelectedIndexingSolution(XSDataIndexingSolutionSelected.parseString(xsDataIndexingResult.getSelectedSolution().marshal()))
             self.__edPluginControlGeneratePrediction.setDataInput(xsDataGeneratePredictionInput)
             # Start the generation of prediction images - we synchronize in the post-process
             self.__edPluginControlGeneratePrediction.execute()
             # Then start the integration of the reference images
             self.indexingToIntegration()
     else:
         self.screen("Indexing with MOSFLM failed!")
         bIndexWithLabelit = True
     if bIndexWithLabelit:
         # Execute Labelit indexing
         self.screen("Now trying to index with Labelit - please be patient...")
         xsDataIndexingInput = XSDataIndexingInput()
         xsDataSubWedgeList = self.__xsDataCollection.getSubWedge()
         xsDataExperimentalCondition = xsDataSubWedgeList[0].getExperimentalCondition()
         xsDataIndexingInput.setDataCollection(self.__xsDataCollection)
         xsDataIndexingInput.setExperimentalCondition(xsDataExperimentalCondition)
         if self.__xsDataCrystal != None:
             xsDataIndexingInput.setCrystal(self.__xsDataCrystal)
         self.__edPluginControlIndexingLabelit.setDataInput(xsDataIndexingInput)
         self.__edPluginControlIndexingLabelit.executeSynchronous()
Beispiel #4
0
 def preProcess(self, _edObject=None):
     EDPluginControl.preProcess(self)
     self.DEBUG("EDPluginControlIndexingIndicatorsv10.preProcess")
     # Load and prepare the execution plugin
     self.__edPluginMOSFLMIndexing = self.loadPlugin(
         self.__strMOSFLMIndexingPluginName)
     self.__edPluginMOSFLMIndexing.setUseWarningInsteadOfError(True)
     xsDataIndexingInput = XSDataIndexingInput()
     xsDataIndexingInput.setDataCollection(
         self.getDataInput("dataCollection")[0])
     if self.hasDataInput("crystal"):
         xsDataIndexingInput.setCrystal(self.getDataInput("crystal")[0])
     if self.hasDataInput("refinedExperimentalCondition"):
         xsDataIndexingInput.setExperimentalCondition(
             self.getDataInput("refinedExperimentalCondition")[0])
     from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
     xsDataMOSFLMIndexingInput = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIndexing(
         xsDataIndexingInput)
     self.__edPluginMOSFLMIndexing.setDataInput(xsDataMOSFLMIndexingInput)
     self.__edPluginControlIndicators = self.loadPlugin(
         self.__strControlledIndicatorsPluginName)
     # Extract the images from the data collections
     xsDataSubWedgeList = self.getDataInput(
         "dataCollection")[0].getSubWedge()
     xsDataInputControlImageQualityIndicators = XSDataInputControlImageQualityIndicators(
     )
     for xsDataSubWedge in xsDataSubWedgeList:
         xsDataImageList = xsDataSubWedge.getImage()
         for xsDataImage in xsDataImageList:
             xsDataInputControlImageQualityIndicators.addImage(xsDataImage)
     self.__edPluginControlIndicators.setDataInput(
         xsDataInputControlImageQualityIndicators)
    def preProcess(self, _edObject=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edObject)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv1_1.preProcess...")

        self.__edPluginIndexing = self.loadPlugin(self.__strPluginIndexingName   , "Indexing")
        self.__edPluginIntegration = self.loadPlugin(self.__strPluginIntegrationName, "Integration")
        self.__edPluginStrategy = self.loadPlugin(self.__strPluginStrategyName   , "Strategy")

        if (self.__edPluginIndexing is not None):
            EDVerbose.DEBUG("EDPluginControlCharacterisationv1_1.preProcess: " + self.__strPluginIndexingName + " Found... setting Data Input")
            # create Data Input for indexing
            xsDataInputStrategy = self.getDataInput()
            xsDataCollection = xsDataInputStrategy.getDataCollection()
            xsDataSample = xsDataCollection.getSample()
            xsDataSubWedgeList = xsDataCollection.getSubWedge()
            if ((xsDataSubWedgeList is None) or (xsDataSubWedgeList == [])):
            	strError = "EDPluginControlCharacterisationv1_1.preProcess: No subwedges in input data."
            	EDVerbose.ERROR(strError)
                self.setFailure()
            else:
                xsDataExperimentalCondition = xsDataSubWedgeList[0].getExperimentalCondition()

                # Fix for bug 431: if the flux is zero raise an error
                xsDataDoubleFlux = xsDataExperimentalCondition.getBeam().getFlux()
                if (xsDataDoubleFlux is not None):
                    if (xsDataDoubleFlux.getValue() < 0.1):
                        pyStrErrorMessage = "EDPluginControlCharacterisationv1_1.preProcess ERROR: Input flux is negative or close to zero. Execution of characterisation aborted."
                        EDVerbose.ERROR(pyStrErrorMessage)
                        self.addErrorMessage(pyStrErrorMessage)
                        self.setFailure()

                xsDataIndexingInput = XSDataIndexingInput()
                xsDataIndexingInput.setDataCollection(xsDataCollection)
                xsDataIndexingInput.setExperimentalCondition(xsDataExperimentalCondition)

                xsDataDiffractionPlan = xsDataCollection.getDiffractionPlan()
                xsDataStringForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup()
                if (xsDataStringForcedSpaceGroup is not None):
                    xsDataCrystal = XSDataCrystal()
                    xsDataSpaceGroup = XSDataSpaceGroup()
                    xsDataSpaceGroup.setName(xsDataStringForcedSpaceGroup)
                    xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
                    xsDataIndexingInput.setCrystal(xsDataCrystal)

                self.__edPluginIndexing.setDataInput(xsDataIndexingInput)

                # Populate characterisation object
                self.__xsDataResultCharacterisation = XSDataResultCharacterisation()
                self.__xsDataResultCharacterisation.setDataCollection(XSDataCollection.parseString(xsDataCollection.marshal()))
Beispiel #6
0
    def preProcess(self, _edObject=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edObject)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv2_0.preProcess...")

        self.edPluginIndexing = self.loadPlugin(self.strPluginIndexingName,
                                                "Indexing")
        self.edPluginIntegration = self.loadPlugin(
            self.strPluginIntegrationName, "Integration")
        self.edPluginStrategy = self.loadPlugin(self.strPluginStrategyName,
                                                "Strategy")

        if (self.edPluginIndexing is not None):
            EDVerbose.DEBUG(
                "EDPluginControlCharacterisationv2_0.preProcess: " +
                self.strPluginIndexingName + " Found... setting Data Input")
            # create Data Input for indexing
            xsDataInputStrategy = self.getDataInput(
                "mxv1InputCharacterisation")[0]
            xsDataCollection = xsDataInputStrategy.getDataCollection()
            #xsDataSample = xsDataCollection.getSample()
            xsDataSubWedgeList = xsDataCollection.getSubWedge()
            xsDataExperimentalCondition = xsDataSubWedgeList[
                0].getExperimentalCondition()

            xsDataIndexingInput = XSDataIndexingInput()
            xsDataIndexingInput.setDataCollection(xsDataCollection)
            xsDataIndexingInput.setExperimentalCondition(
                xsDataExperimentalCondition)

            xsDataDiffractionPlan = xsDataCollection.getDiffractionPlan()
            xsDataStringForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup(
            )
            if (xsDataStringForcedSpaceGroup is not None):
                xsDataCrystal = XSDataCrystal()
                xsDataSpaceGroup = XSDataSpaceGroup()
                xsDataSpaceGroup.setName(xsDataStringForcedSpaceGroup)
                xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
                xsDataIndexingInput.setCrystal(xsDataCrystal)

            self.edPluginIndexing.setDataInput(xsDataIndexingInput)

            # Populate characterisation object
            self.xsDataResultCharacterisationv2_0 = XSDataResultCharacterisationv2_0(
            )
            self.xsDataResultCharacterisation = XSDataResultCharacterisation()
            self.xsDataResultCharacterisationv2_0.setMxv1ResultCharacterisation(
                self.xsDataResultCharacterisation)
            self.xsDataResultCharacterisation.setDataCollection(
                XSDataCollection.parseString(xsDataCollection.marshal()))
    def preProcess(self, _edObject=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edObject)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv2_0.preProcess...")

        self.edPluginIndexing = self.loadPlugin(self.strPluginIndexingName, "Indexing")
        self.edPluginIntegration = self.loadPlugin(self.strPluginIntegrationName, "Integration")
        self.edPluginStrategy = self.loadPlugin(self.strPluginStrategyName, "Strategy")

        if self.edPluginIndexing is not None:
            EDVerbose.DEBUG(
                "EDPluginControlCharacterisationv2_0.preProcess: "
                + self.strPluginIndexingName
                + " Found... setting Data Input"
            )
            # create Data Input for indexing
            xsDataInputStrategy = self.getDataInput("mxv1InputCharacterisation")[0]
            xsDataCollection = xsDataInputStrategy.getDataCollection()
            # xsDataSample = xsDataCollection.getSample()
            xsDataSubWedgeList = xsDataCollection.getSubWedge()
            xsDataExperimentalCondition = xsDataSubWedgeList[0].getExperimentalCondition()

            xsDataIndexingInput = XSDataIndexingInput()
            xsDataIndexingInput.setDataCollection(xsDataCollection)
            xsDataIndexingInput.setExperimentalCondition(xsDataExperimentalCondition)

            xsDataDiffractionPlan = xsDataCollection.getDiffractionPlan()
            xsDataStringForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup()
            if xsDataStringForcedSpaceGroup is not None:
                xsDataCrystal = XSDataCrystal()
                xsDataSpaceGroup = XSDataSpaceGroup()
                xsDataSpaceGroup.setName(xsDataStringForcedSpaceGroup)
                xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
                xsDataIndexingInput.setCrystal(xsDataCrystal)

            self.edPluginIndexing.setDataInput(xsDataIndexingInput)

            # Populate characterisation object
            self.xsDataResultCharacterisationv2_0 = XSDataResultCharacterisationv2_0()
            self.xsDataResultCharacterisation = XSDataResultCharacterisation()
            self.xsDataResultCharacterisationv2_0.setMxv1ResultCharacterisation(self.xsDataResultCharacterisation)
            self.xsDataResultCharacterisation.setDataCollection(
                XSDataCollection.parseString(xsDataCollection.marshal())
            )
Beispiel #8
0
 def preProcess(self, _edObject=None):
     EDPluginControl.preProcess(self)
     self.DEBUG("EDPluginControlIndexingIndicatorsv1_1.preProcess")
     # Load and prepare the execution plugin
     self.edPluginIndexingLabelit = self.loadPlugin(
         self.strPluginIndexingLabelit)
     self.edPluginIndexingLabelit.setUseWarningInsteadOfError(True)
     xsDataIndexingInput = XSDataIndexingInput()
     xsDataIndexingInput.setDataCollection(
         self.getDataInput("dataCollection")[0])
     if self.hasDataInput("crystal"):
         xsDataIndexingInput.setCrystal(self.getDataInput("crystal")[0])
     if self.hasDataInput("refinedExperimentalCondition"):
         self.xsDataExperimentalCondition = self.getDataInput(
             "refinedExperimentalCondition")[0]
     else:
         self.xsDataExperimentalCondition = self.getDataInput(
             "dataCollection")[0].getSubWedge()[0].getExperimentalCondition(
             )
     xsDataIndexingInput.setExperimentalCondition(
         self.xsDataExperimentalCondition)
     from EDHandlerXSDataPhenixv1_1 import EDHandlerXSDataPhenixv1_1
     xsDataInputLabelitIndexing = EDHandlerXSDataPhenixv1_1.generateXSDataInputLabelitIndexing(
         xsDataIndexingInput)
     self.edPluginIndexingLabelit.setDataInput(xsDataInputLabelitIndexing)
     #
     if self.bDoLabelitIndexing:
         if (self.getControlledPluginName("indicatorsPlugin") is not None):
             self.strControlledIndicatorsPluginName = self.getControlledPluginName(
                 "indicatorsPlugin")
     self.edPluginControlIndicators = self.loadPlugin(
         self.strControlledIndicatorsPluginName)
     # Extract the images from the data collections
     xsDataSubWedgeList = self.getDataInput(
         "dataCollection")[0].getSubWedge()
     xsDataInputControlImageQualityIndicators = XSDataInputControlImageQualityIndicators(
     )
     for xsDataSubWedge in xsDataSubWedgeList:
         xsDataImageList = xsDataSubWedge.getImage()
         for xsDataImage in xsDataImageList:
             xsDataInputControlImageQualityIndicators.addImage(xsDataImage)
     self.edPluginControlIndicators.setDataInput(
         xsDataInputControlImageQualityIndicators)
 def preProcess(self, _edObject=None):
     EDPluginControl.preProcess(self)
     EDVerbose.DEBUG("EDPluginControlIndexingIndicatorsv10.preProcess")
     # Load and prepare the execution plugin
     self.__edPluginMOSFLMIndexing = self.loadPlugin(self.__strMOSFLMIndexingPluginName)
     xsDataIndexingInput = XSDataIndexingInput()
     xsDataIndexingInput.setDataCollection(self.getDataInput("dataCollection")[0])
     if self.hasDataInput("crystal"):
         xsDataIndexingInput.setCrystal(self.getDataInput("crystal")[0])
     if self.hasDataInput("refinedExperimentalCondition"):
         xsDataIndexingInput.setExperimentalCondition(self.getDataInput("refinedExperimentalCondition")[0])
     from EDHandlerXSDataMOSFLMv10 import EDHandlerXSDataMOSFLMv10
     xsDataMOSFLMIndexingInput = EDHandlerXSDataMOSFLMv10.generateXSDataMOSFLMInputIndexing(xsDataIndexingInput)
     self.__edPluginMOSFLMIndexing.setDataInput(xsDataMOSFLMIndexingInput)
     self.__edPluginControlIndicators = self.loadPlugin(self.__strControlledIndicatorsPluginName)
     # Extract the images from the data collections
     xsDataSubWedgeList = self.getDataInput("dataCollection")[0].getSubWedge()
     xsDataInputControlImageQualityIndicators = XSDataInputControlImageQualityIndicators()
     for xsDataSubWedge in xsDataSubWedgeList:
         xsDataImageList = xsDataSubWedge.getImage()
         for xsDataImage in xsDataImageList:
             xsDataInputControlImageQualityIndicators.addImage(xsDataImage)
     self.__edPluginControlIndicators.setDataInput(xsDataInputControlImageQualityIndicators)
    def preProcess(self, _edObject=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edObject)
        EDVerbose.DEBUG("EDPluginControlCharacterisationv1_1.preProcess...")

        self.__edPluginIndexing = self.loadPlugin(self.__strPluginIndexingName,
                                                  "Indexing")
        self.__edPluginIntegration = self.loadPlugin(
            self.__strPluginIntegrationName, "Integration")
        self.__edPluginStrategy = self.loadPlugin(self.__strPluginStrategyName,
                                                  "Strategy")

        if (self.__edPluginIndexing is not None):
            EDVerbose.DEBUG(
                "EDPluginControlCharacterisationv1_1.preProcess: " +
                self.__strPluginIndexingName + " Found... setting Data Input")
            # create Data Input for indexing
            xsDataInputStrategy = self.getDataInput()
            xsDataCollection = xsDataInputStrategy.getDataCollection()
            xsDataSample = xsDataCollection.getSample()
            xsDataSubWedgeList = xsDataCollection.getSubWedge()
            if ((xsDataSubWedgeList is None) or (xsDataSubWedgeList == [])):
                strError = "EDPluginControlCharacterisationv1_1.preProcess: No subwedges in input data."
                EDVerbose.ERROR(strError)
                self.setFailure()
            else:
                xsDataExperimentalCondition = xsDataSubWedgeList[
                    0].getExperimentalCondition()

                # Fix for bug 431: if the flux is zero raise an error
                xsDataDoubleFlux = xsDataExperimentalCondition.getBeam(
                ).getFlux()
                if (xsDataDoubleFlux is not None):
                    if (xsDataDoubleFlux.getValue() < 0.1):
                        pyStrErrorMessage = "EDPluginControlCharacterisationv1_1.preProcess ERROR: Input flux is negative or close to zero. Execution of characterisation aborted."
                        EDVerbose.ERROR(pyStrErrorMessage)
                        self.addErrorMessage(pyStrErrorMessage)
                        self.setFailure()

                xsDataIndexingInput = XSDataIndexingInput()
                xsDataIndexingInput.setDataCollection(xsDataCollection)
                xsDataIndexingInput.setExperimentalCondition(
                    xsDataExperimentalCondition)

                xsDataDiffractionPlan = xsDataCollection.getDiffractionPlan()
                xsDataStringForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup(
                )
                if (xsDataStringForcedSpaceGroup is not None):
                    xsDataCrystal = XSDataCrystal()
                    xsDataSpaceGroup = XSDataSpaceGroup()
                    xsDataSpaceGroup.setName(xsDataStringForcedSpaceGroup)
                    xsDataCrystal.setSpaceGroup(xsDataSpaceGroup)
                    xsDataIndexingInput.setCrystal(xsDataCrystal)

                self.__edPluginIndexing.setDataInput(xsDataIndexingInput)

                # Populate characterisation object
                self.__xsDataResultCharacterisation = XSDataResultCharacterisation(
                )
                self.__xsDataResultCharacterisation.setDataCollection(
                    XSDataCollection.parseString(xsDataCollection.marshal()))