当前位置: 首页>>代码示例>>Python>>正文


Python XSDataDiffractionPlan.setStrategyOption方法代码示例

本文整理汇总了Python中XSDataMXv1.XSDataDiffractionPlan.setStrategyOption方法的典型用法代码示例。如果您正苦于以下问题:Python XSDataDiffractionPlan.setStrategyOption方法的具体用法?Python XSDataDiffractionPlan.setStrategyOption怎么用?Python XSDataDiffractionPlan.setStrategyOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XSDataMXv1.XSDataDiffractionPlan的用法示例。


在下文中一共展示了XSDataDiffractionPlan.setStrategyOption方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setPluginInput

# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import setStrategyOption [as 别名]
    def setPluginInput(self, _edPlugin):
        xsDataDiffractionPlan = XSDataDiffractionPlan()
        if (not self.__fMaxExposureTimePerDataCollection is None):
            xsDataDiffractionPlan.setMaxExposureTimePerDataCollection(XSDataTime(self.__fMaxExposureTimePerDataCollection))
        if (not self.__strForcedSpaceGroup is None):
            xsDataDiffractionPlan.setForcedSpaceGroup(XSDataString(self.__strForcedSpaceGroup))
        if (not self.__bAnomalousData is None):
            xsDataDiffractionPlan.setAnomalousData(XSDataBoolean(self.__bAnomalousData))
        if (not self.__strStrategyOption is None):
            xsDataDiffractionPlan.setStrategyOption(XSDataString(self.__strStrategyOption))
        if (not self.__strComplexity is None):
            xsDataDiffractionPlan.setComplexity(XSDataString(self.__strComplexity))
        _edPlugin.setDataInput(xsDataDiffractionPlan, "diffractionPlan")

        if (not self.__listImagePaths is None):
            for strImagePath in self.__listImagePaths:
                _edPlugin.setDataInput(XSDataString(strImagePath), "imagePaths")

        if (not self.__xsDataInputCharacterisation is None):
            _edPlugin.setDataInput(self.__xsDataInputCharacterisation, "inputCharacterisation")
        if (not self.__fFlux is None):
            _edPlugin.setDataInput(XSDataFloat(self.__fFlux), "flux")
        if (not self.__fMinExposureTimePerImage is None):
            _edPlugin.setDataInput(XSDataFloat(self.__fMinExposureTimePerImage), "minExposureTimePerImage")
        if (not self.__fBeamSize is None):
            _edPlugin.setDataInput(XSDataFloat(self.__fBeamSize), "beamSize")
        if (not self.__bTemplateMode is None):
            _edPlugin.setDataInput(XSDataBoolean(self.__bTemplateMode), "templateMode")
        if (not self.__strGeneratedTemplateFile is None):
            _edPlugin.setDataInput(XSDataString(self.__strGeneratedTemplateFile), "generatedTemplateFile")
        if (not self.__strResultsFilePath is None):
            _edPlugin.setDataInput(XSDataString(self.__strResultsFilePath), "resultsFilePath")
        if (not self.__fBeamPosX is None):
            _edPlugin.setDataInput(XSDataFloat(self.__fBeamPosX), "beamPosX")
        if (not self.__fBeamPosY is None):
            _edPlugin.setDataInput(XSDataFloat(self.__fBeamPosY), "beamPosY")
        if (not self.__iDataCollectionId is None):
            _edPlugin.setDataInput(XSDataInteger(self.__iDataCollectionId), "dataCollectionId")
        if (not self.__strShortComments is None):
            _edPlugin.setDataInput(XSDataString(self.__strShortComments), "shortComments")
        if (not self.__strComments is None):
            _edPlugin.setDataInput(XSDataString(self.__strComments), "comments")
        if (not self.__fTransmission is None):
            _edPlugin.setDataInput(XSDataDouble(self.__fTransmission), "transmission")
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:46,代码来源:EDApplicationMXv1Characterisation.py

示例2: createInputCharacterisationFromSubWedges

# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import setStrategyOption [as 别名]
 def createInputCharacterisationFromSubWedges(self):
     self.DEBUG("EDPluginControlInterfacev2_0.createInputCharacterisationFromSubWedges")
     xsDataResultSubWedgeAssemble = self.edPluginControlSubWedgeAssemble.getDataOutput()
     self.xsDataInputCharacterisation = XSDataInputCharacterisation()
     xsDataCollection = XSDataCollection()
     # Default exposure time (for the moment, this value should be
     # possible to read from the command line)
     xsDataDiffractionPlan = XSDataDiffractionPlan()
     if (not xsDataResultSubWedgeAssemble is None):
         pyListSubWedge = xsDataResultSubWedgeAssemble.getSubWedge()
         xsDataCollection.setSubWedge(pyListSubWedge)
         for xsDataSubWedge in pyListSubWedge:
             if (self.strComplexity is not None):
                 xsDataDiffractionPlan.setComplexity(XSDataString(self.strComplexity))
             if (self.fFlux is not None):
                 xsDataSubWedge.getExperimentalCondition().getBeam().setFlux(XSDataFloat(self.fFlux))
             if (self.fBeamSize is not None):
                 xsDataSize = XSDataSize()
                 xsDataSize.setX(XSDataLength(self.fBeamSize))
                 xsDataSize.setY(XSDataLength(self.fBeamSize))
                 xsDataSubWedge.getExperimentalCondition().getBeam().setSize(xsDataSize)
             if (self.fBeamPosX is not None):
                 xsDataSubWedge.getExperimentalCondition().getDetector().setBeamPositionX(XSDataLength(self.fBeamPosX))
             if (self.fBeamPosY is not None):
                 xsDataSubWedge.getExperimentalCondition().getDetector().setBeamPositionY(XSDataLength(self.fBeamPosY))
             if (self.fMinExposureTimePerImage is not None):
                 xsDataSubWedge.getExperimentalCondition().getBeam().setMinExposureTimePerImage(XSDataFloat(self.fMinExposureTimePerImage))
             if (self.fTransmission is not None):
                 xsDataSubWedge.getExperimentalCondition().getBeam().setTransmission(XSDataDouble(self.fTransmission))
     if (self.strForcedSpaceGroup is not None):
         xsDataDiffractionPlan.setForcedSpaceGroup(XSDataString(self.strForcedSpaceGroup))
     xsDataDiffractionPlan.setAnomalousData(XSDataBoolean(self.bAnomalousData))
     xsDataDiffractionPlan.setMaxExposureTimePerDataCollection(XSDataTime(self.fMaxExposureTimePerDataCollection))
     if (self.strStrategyOption is not None):
         xsDataDiffractionPlan.setStrategyOption(XSDataString(self.strStrategyOption))
     xsDataCollection.setDiffractionPlan(xsDataDiffractionPlan)
     self.xsDataInputCharacterisation.setDataCollection(xsDataCollection)
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:39,代码来源:EDPluginControlInterfacev2_0.py

示例3: EDPluginControlInterfacev1_3

# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import setStrategyOption [as 别名]

#.........这里部分代码省略.........
            pyListSubWedge = xsDataResultSubWedgeAssemble.getSubWedge()
            xsDataCollection.setSubWedge(pyListSubWedge)
            for xsDataSubWedge in pyListSubWedge:
                if (self.strComplexity is not None):
                    self.xsDataDiffractionPlan.setComplexity(XSDataString(self.strComplexity))
                if (self.fFlux is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setFlux(XSDataFlux(self.fFlux))
                if (self.fBeamSizeX is not None) and (self.fBeamSizeY is not None):
                    xsDataSize = XSDataSize()
                    xsDataSize.setX(XSDataLength(self.fBeamSizeX))
                    xsDataSize.setY(XSDataLength(self.fBeamSizeY))
                    xsDataSubWedge.getExperimentalCondition().getBeam().setSize(xsDataSize)
                if (self.fApertureSize is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setApertureSize(XSDataLength(self.fApertureSize))
                if (self.fBeamPosX is not None):
                    xsDataSubWedge.getExperimentalCondition().getDetector().setBeamPositionX(XSDataLength(self.fBeamPosX))
                if (self.fBeamPosY is not None):
                    xsDataSubWedge.getExperimentalCondition().getDetector().setBeamPositionY(XSDataLength(self.fBeamPosY))
                if (self.fMinExposureTimePerImage is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setMinExposureTimePerImage(XSDataTime(self.fMinExposureTimePerImage))
                if (self.fTransmission is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setTransmission(XSDataDouble(self.fTransmission))
                if (self.fWavelength is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setWavelength(XSDataWavelength(self.fWavelength))
                if self.fMinOscillationWidth != None:
                    xsDataSubWedge.getExperimentalCondition().getGoniostat().setMinOscillationWidth(XSDataAngle(self.fMinOscillationWidth))
                if self.fMaxOscillationSpeed != None:
                    xsDataSubWedge.getExperimentalCondition().getGoniostat().setMaxOscillationSpeed(XSDataAngularSpeed(self.fMaxOscillationSpeed))
        if (self.strForcedSpaceGroup is not None):
            self.xsDataDiffractionPlan.setForcedSpaceGroup(XSDataString(self.strForcedSpaceGroup))
        self.xsDataDiffractionPlan.setAnomalousData(XSDataBoolean(self.bAnomalousData))
        self.xsDataDiffractionPlan.setMaxExposureTimePerDataCollection(XSDataTime(self.fMaxExposureTimePerDataCollection))
        if (self.strStrategyOption is not None):
            self.xsDataDiffractionPlan.setStrategyOption(XSDataString(self.strStrategyOption))
        xsDataCollection.setDiffractionPlan(self.xsDataDiffractionPlan)
        if self.xsDataSample is not None:
            xsDataCollection.setSample(XSDataSampleCrystalMM.parseString(self.xsDataSample.marshal()))
        self.xsDataInputCharacterisation.setDataCollection(xsDataCollection)


    def generateTemplateFile(self, _edPlugin):
        self.DEBUG("EDPluginControlInterfacev1_3.generateTemplateFile")
        self.createInputCharacterisationFromSubWedges()
        if(self.strGeneratedTemplateFile is None):
            self.screen("No argument for command line --generateTemplate key word found!")
        elif (self.xsDataInputCharacterisation is None):
            self.screen("ERROR! Cannot generate template file %s, please check the log files." % self.strGeneratedTemplateFile)
        else:
            self.screen("Generating xml template input file for edna: " + self.strGeneratedTemplateFile + "...")
            self.xsDataInputCharacterisation.exportToFile(self.strGeneratedTemplateFile)


    def doSubWedgeAssembleSUCCESS(self, _edPlugin):
        self.DEBUG("EDPluginControlInterfacev1_3.doSubWedgeAssembleSUCCESS")
        self.createInputCharacterisationFromSubWedges()
        self.runCharacterisationPlugin(_edPlugin)

    def doSubWedgeAssembleFAILURE(self, _edPlugin):
        self.DEBUG("EDPluginControlInterfacev1_3.doSubWedgeAssembleFAILURE")
        self.screen("Execution of " + self.strEDPluginControlSubWedgeAssembleName + "  failed.")
        self.screen("Please inspect the log file for further information.")
        self.setFailure()

    def doFailureActionCharacterisation(self, _edPlugin=None):
        """
        retrieve the potential warning messages
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:70,代码来源:EDPluginControlInterfacev1_3.py

示例4: EDPluginControlInterfacev1_2

# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import setStrategyOption [as 别名]

#.........这里部分代码省略.........
            self.xsDataDiffractionPlan = XSDataDiffractionPlan()
        if (not xsDataResultSubWedgeAssemble is None):
            pyListSubWedge = xsDataResultSubWedgeAssemble.getSubWedge()
            xsDataCollection.setSubWedge(pyListSubWedge)
            for xsDataSubWedge in pyListSubWedge:
                if (self.strComplexity is not None):
                    self.xsDataDiffractionPlan.setComplexity(XSDataString(self.strComplexity))
                if (self.fFlux is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setFlux(XSDataFlux(self.fFlux))
                if (self.fBeamSizeX is not None) and (self.fBeamSizeY is not None):
                    xsDataSize = XSDataSize()
                    xsDataSize.setX(XSDataLength(self.fBeamSizeX))
                    xsDataSize.setY(XSDataLength(self.fBeamSizeY))
                    xsDataSubWedge.getExperimentalCondition().getBeam().setSize(xsDataSize)
                if (self.fBeamPosX is not None):
                    xsDataSubWedge.getExperimentalCondition().getDetector().setBeamPositionX(XSDataLength(self.fBeamPosX))
                if (self.fBeamPosY is not None):
                    xsDataSubWedge.getExperimentalCondition().getDetector().setBeamPositionY(XSDataLength(self.fBeamPosY))
                if (self.fMinExposureTimePerImage is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setMinExposureTimePerImage(XSDataTime(self.fMinExposureTimePerImage))
                if (self.fTransmission is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setTransmission(XSDataDouble(self.fTransmission))
                if (self.fWavelength is not None):
                    xsDataSubWedge.getExperimentalCondition().getBeam().setWavelength(XSDataWavelength(self.fWavelength))
                if self.fMinOscillationWidth != None:
                    xsDataSubWedge.getExperimentalCondition().getGoniostat().setMinOscillationWidth(XSDataAngle(self.fMinOscillationWidth))
                if self.fMaxOscillationSpeed != None:
                    xsDataSubWedge.getExperimentalCondition().getGoniostat().setMaxOscillationSpeed(XSDataAngularSpeed(self.fMaxOscillationSpeed))
        if (self.strForcedSpaceGroup is not None):
            self.xsDataDiffractionPlan.setForcedSpaceGroup(XSDataString(self.strForcedSpaceGroup))
        self.xsDataDiffractionPlan.setAnomalousData(XSDataBoolean(self.bAnomalousData))
        self.xsDataDiffractionPlan.setMaxExposureTimePerDataCollection(XSDataTime(self.fMaxExposureTimePerDataCollection))
        if (self.strStrategyOption is not None):
            self.xsDataDiffractionPlan.setStrategyOption(XSDataString(self.strStrategyOption))
        xsDataCollection.setDiffractionPlan(self.xsDataDiffractionPlan)
        if self.xsDataSample is not None:
            xsDataCollection.setSample(XSDataSampleCrystalMM.parseString(self.xsDataSample.marshal()))
        self.xsDataInputCharacterisation.setDataCollection(xsDataCollection)


    def generateTemplateFile(self, _edPlugin):
        EDVerbose.DEBUG("EDPluginControlInterfacev1_2.generateTemplateFile")
        self.createInputCharacterisationFromSubWedges()
        if(self.strGeneratedTemplateFile is None):
            EDVerbose.screen("No argument for command line --generateTemplate key word found!")
        elif (self.xsDataInputCharacterisation is None):
            EDVerbose.screen("ERROR! Cannot generate template file %s, please check the log files." % self.strGeneratedTemplateFile)
        else:
            EDVerbose.screen("Generating xml template input file for edna: " + self.strGeneratedTemplateFile + "...")
            self.xsDataInputCharacterisation.exportToFile(self.strGeneratedTemplateFile)


    def doSubWedgeAssembleSUCCESS(self, _edPlugin):
        EDVerbose.DEBUG("EDPluginControlInterfacev1_2.doSubWedgeAssembleSUCCESS")
        self.createInputCharacterisationFromSubWedges()
        self.runCharacterisationPlugin(_edPlugin)

    def doSubWedgeAssembleFAILURE(self, _edPlugin):
        EDVerbose.DEBUG("EDPluginControlInterfacev1_2.doSubWedgeAssembleFAILURE")
        EDVerbose.screen("Execution of " + self.strEDPluginControlSubWedgeAssembleName + "  failed.")
        EDVerbose.screen("Please inspect the log file for further information.")
        self.setFailure()

    def doFailureActionCharacterisation(self, _edPlugin=None):
        """
        retrieve the potential warning messages
开发者ID:antolinos,项目名称:edna,代码行数:70,代码来源:EDPluginControlInterfacev1_2.py


注:本文中的XSDataMXv1.XSDataDiffractionPlan.setStrategyOption方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。