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


Python XSDataDiffractionPlan.getMaxExposureTimePerDataCollection方法代码示例

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


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

示例1: EDPluginControlInterfacev1_3

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

#.........这里部分代码省略.........
        if not bUseISPyBPlugin:
            self.DEBUG("EDPluginControlInterfacev1_3 configured to not use ISPyB")
            self.strEDPluginControlISPyBName = None


    def preProcess(self, _edPlugin=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edPlugin)
        self.DEBUG("EDPluginControlInterfacev1_3.preProcess...")

        self.listImagePaths = []

        # Check if XSDataInputInterface is given as input
        if self.hasDataInput():
            xsDataInputInterface = self.getDataInput()

            if xsDataInputInterface.getExperimentalCondition():
                self.xsDataExperimentalCodition = xsDataInputInterface.getExperimentalCondition()
                if self.xsDataExperimentalCodition.getGoniostat():
                    if self.xsDataExperimentalCodition.getGoniostat().getMinOscillationWidth():
                        self.fMinOscillationWidth = self.xsDataExperimentalCodition.getGoniostat().getMinOscillationWidth().getValue()
                    if self.xsDataExperimentalCodition.getGoniostat().getMaxOscillationSpeed():
                        self.fMaxOscillationSpeed = self.xsDataExperimentalCodition.getGoniostat().getMaxOscillationSpeed().getValue()


            self.xsDataSample = xsDataInputInterface.getSample()

            self.xsDataDiffractionPlan = self.getDataInput().getDiffractionPlan()
            if self.xsDataDiffractionPlan:
                if self.xsDataDiffractionPlan.getForcedSpaceGroup():
                    self.strForcedSpaceGroup = self.xsDataDiffractionPlan.getForcedSpaceGroup().getValue()
                if self.xsDataDiffractionPlan.getMaxExposureTimePerDataCollection():
                    self.fMaxExposureTimePerDataCollection = self.xsDataDiffractionPlan.getMaxExposureTimePerDataCollection().getValue()
                if self.xsDataDiffractionPlan.getAnomalousData():
                    self.bAnomalousData = self.xsDataDiffractionPlan.getAnomalousData().getValue()
                if self.xsDataDiffractionPlan.getStrategyOption():
                    self.strStrategyOption = self.xsDataDiffractionPlan.getStrategyOption().getValue()
                if self.xsDataDiffractionPlan.getComplexity():
                    self.strComplexity = self.xsDataDiffractionPlan.getComplexity().getValue()
                if self.fMinOscillationWidth == None:
                    if self.xsDataDiffractionPlan.getGoniostatMinOscillationWidth():
                        self.fMinOscillationWidth = self.xsDataDiffractionPlan.getGoniostatMinOscillationWidth().getValue()
                if self.fMaxOscillationSpeed == None:
                    if self.xsDataDiffractionPlan.getGoniostatMaxOscillationSpeed():
                        self.fMaxOscillationSpeed = self.xsDataDiffractionPlan.getGoniostatMaxOscillationSpeed().getValue()


            self.xsDataSample = xsDataInputInterface.getSample()

            if xsDataInputInterface.getImagePath():
                for xsDataFile in xsDataInputInterface.getImagePath():
                    self.listImagePaths.append(xsDataFile.getPath())

            if xsDataInputInterface.getFlux():
                self.fFlux = xsDataInputInterface.getFlux().getValue()
            elif self.xsDataExperimentalCodition != None:
                if self.xsDataExperimentalCodition.getBeam() != None:
                    if self.xsDataExperimentalCodition.getBeam().getFlux() != None:
                        self.fFlux = self.xsDataExperimentalCodition.getBeam().getFlux().getValue()

            if xsDataInputInterface.getMinExposureTimePerImage():
                self.fMinExposureTimePerImage = xsDataInputInterface.getMinExposureTimePerImage().getValue()
            elif self.xsDataExperimentalCodition != None:
                if self.xsDataExperimentalCodition.getBeam() != None:
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:70,代码来源:EDPluginControlInterfacev1_3.py

示例2: EDPluginControlGridScreeningv1_0

# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getMaxExposureTimePerDataCollection [as 别名]
class EDPluginControlGridScreeningv1_0(EDPluginControl):
    """
    This plugin is a "light-weight" characterisation to be used for processing
    images from grid scans.
    """


    def __init__(self):
        EDPluginControl.__init__(self)
        self.setXSDataInputClass(XSDataInputGridScreening)
        self.strControlReadImageHeaderPluginName = "EDPluginControlReadImageHeaderv10"
        self.edPluginControlReadImageHeader = None
        self.strControlledIndicatorsPluginName = "EDPluginControlImageQualityIndicatorsv1_4"
        self.edPluginControlIndicators = None
        self.strISPyBStoreImageQualityIndicatorsPluginName = "EDPluginISPyBStoreImageQualityIndicatorsv1_4"
        self.edPluginISPyBStoreImageQualityIndicators = None
        self.strIndexingMOSFLMPluginName = "EDPluginMOSFLMIndexingv10"
        self.edPluginMOSFLMIndexing = None
        self.strPluginControlIntegration = "EDPluginControlIntegrationv10"
        self.edPluginControlIntegration = None
        self.strPluginControlStrategy = "EDPluginControlStrategyv1_2"
        self.edPluginControlStrategy = None
        self.strPluginExecMtz2Various = "EDPluginExecMtz2Variousv1_0"
        self.edPluginExecMtz2Various = None
        self.strImageFile = None
        self.xsDataIndexingResultMOSFLM = None
        self.xsDataCrystal = None
        self.strCharacterisationShortSummary = ""
        self.strStatusMessage = ""
        self.xsDataDiffractionPlan = None
        self.xsDataCollection = None
        self.xsDataIndexingResult = None
        self.xsDataStrategyResult = None
        self.xsDataImageQualityIndicators = None
        self.bStoreImageQualityIndicatorsInISPyB = False
        self.bDoOnlyImageQualityIndicators = False
        self.bDoOnlyIntegrationWithXMLOutput = False
        self.iImageQualityIndicatorsId = None
        self.xsDataGridScreeningResultIntegration = None


    def checkParameters(self):
        """
        Checks the mandatory parameters.
        """
        self.DEBUG("EDPluginControlGridScreeningv1_0.checkParameters")
        self.checkMandatoryParameters(self.getDataInput(), "Data Input is None")
        self.checkMandatoryParameters(self.getDataInput().getImageFile(), "imageFile")


    def preProcess(self, _edObject=None):
        EDPluginControl.preProcess(self)
        self.DEBUG("EDPluginControlGridScreeningv1_0.preProcess")
        # Load the plugins
        self.edPluginControlReadImageHeader = self.loadPlugin(self.strControlReadImageHeaderPluginName, \
                                                                   "ReadImageHeader")
        self.edPluginControlIndicators = self.loadPlugin(self.strControlledIndicatorsPluginName, \
                                                                   "ControlIndicators")
        self.edPluginMOSFLMIndexing = self.loadPlugin(self.strIndexingMOSFLMPluginName, \
                                                                   "IndexingMOSFLM")
        self.edPluginControlIntegration = self.loadPlugin(self.strPluginControlIntegration, \
                                                            "Integration")
        self.edPluginControlStrategy = self.loadPlugin(self.strPluginControlStrategy, \
                                                         "Strategy")
        self.edPluginExecMtz2Various = self.loadPlugin(self.strPluginExecMtz2Various, \
                                                         "Mtz2Various")
        # Input data
        self.strImageFile = self.getDataInput().getImageFile().getPath().getValue()
        self.xsDataGridScreeningFileNameParameters = self.getFileNameParameters(self.strImageFile)
        self.xsDataDiffractionPlan = self.getDataInput().getDiffractionPlan()
        if self.xsDataDiffractionPlan is None:
            self.xsDataDiffractionPlan = XSDataDiffractionPlan()
        if self.xsDataDiffractionPlan.getMaxExposureTimePerDataCollection() is None:
            # Default max esposure time: 10000s
            self.xsDataDiffractionPlan.setMaxExposureTimePerDataCollection(XSDataTime(10000))
        self.xsDataDiffractionPlan.setEstimateRadiationDamage(XSDataBoolean(False))
        # Image quality indicators
        if self.getDataInput().getStoreImageQualityIndicatorsInISPyB():
            self.bStoreImageQualityIndicatorsInISPyB = self.getDataInput().getStoreImageQualityIndicatorsInISPyB().getValue()
        if self.getDataInput().getDoOnlyImageQualityIndicators():
            self.bDoOnlyImageQualityIndicators = self.getDataInput().getDoOnlyImageQualityIndicators().getValue()
        if self.getDataInput().getDoOnlyIntegrationWithXMLOutput():
            self.bDoOnlyIntegrationWithXMLOutput = self.getDataInput().getDoOnlyIntegrationWithXMLOutput().getValue()
        if self.bStoreImageQualityIndicatorsInISPyB:
            self.edPluginISPyBStoreImageQualityIndicators = self.loadPlugin(self.strISPyBStoreImageQualityIndicatorsPluginName, \
                                                         "ISPyBStoreImageQualityIndicators")



    def process(self, _edObject=None):
        EDPluginControl.process(self)
        self.DEBUG("EDPluginControlGridScreeningv1_0.process")
        xsDataInputReadImageHeader = XSDataInputReadImageHeader()
        xsDataInputReadImageHeader.setImage(image=XSDataFile(path=XSDataString(self.strImageFile)))
        self.edPluginControlReadImageHeader.setDataInput(xsDataInputReadImageHeader)
        self.edPluginControlReadImageHeader.connectSUCCESS(self.doSuccessReadImageHeader)
        self.edPluginControlReadImageHeader.connectFAILURE(self.doFailureReadImageHeader)
        self.executePluginSynchronous(self.edPluginControlReadImageHeader)


#.........这里部分代码省略.........
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:103,代码来源:EDPluginControlGridScreeningv1_0.py

示例3: preProcess

# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getMaxExposureTimePerDataCollection [as 别名]
    def preProcess(self, _edPlugin=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edPlugin)
        self.DEBUG("EDPluginControlInterfacev2_0.preProcess...")

        self.listImagePaths = []

        if (self.hasDataInput("diffractionPlan")):
            xsDataDiffractionPlan = XSDataDiffractionPlan()
            xsDataDiffractionPlans = self.getDataInput("diffractionPlan")
            if (not xsDataDiffractionPlans[0] is None):
                xsDataDiffractionPlan = xsDataDiffractionPlans[0]
                if (not xsDataDiffractionPlan.getForcedSpaceGroup() is None):
                    self.strForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup().getValue()
                if (not xsDataDiffractionPlan.getMaxExposureTimePerDataCollection() is None):
                    self.fMaxExposureTimePerDataCollection = xsDataDiffractionPlan.getMaxExposureTimePerDataCollection().getValue()
                if (not xsDataDiffractionPlan.getAnomalousData() is None):
                    self.bAnomalousData = xsDataDiffractionPlan.getAnomalousData().getValue()
                if (not xsDataDiffractionPlan.getStrategyOption() is None):
                    self.strStrategyOption = xsDataDiffractionPlan.getStrategyOption().getValue()
                if (not xsDataDiffractionPlan.getComplexity() is None):
                    self.strComplexity = xsDataDiffractionPlan.getComplexity().getValue()

        if (self.hasDataInput("imagePaths")):
            for strImagePath in self.getDataInput("imagePaths"):
                self.listImagePaths.append(strImagePath)
        if (self.hasDataInput("flux")):
            self.fFlux = self.getDataInput("flux")[0].getValue()
        if (self.hasDataInput("minExposureTimePerImage")):
            self.fMinExposureTimePerImage = self.getDataInput("minExposureTimePerImage")[0].getValue()
        if (self.hasDataInput("beamSize")):
            self.fBeamSize = self.getDataInput("beamSize")[0].getValue()
        if (self.hasDataInput("templateMode")):
            self.bTemplateMode = self.getDataInput("templateMode")[0].getValue()
        if (self.hasDataInput("generatedTemplateFile")):
            self.strGeneratedTemplateFile = self.getDataInput("generatedTemplateFile")[0].getValue()
        if (self.hasDataInput("generatedTemplateFileMXv2")):
            self.strGeneratedTemplateFileMXv2 = self.getDataInput("generatedTemplateFileMXv2")[0].getValue()
        if (self.hasDataInput("resultsFilePath")):
            self.strResultsFilePath = self.getDataInput("resultsFilePath")[0].getValue()
        if (self.hasDataInput("beamPosX")):
            self.fBeamPosX = self.getDataInput("beamPosX")[0].getValue()
        if (self.hasDataInput("beamPosY")):
            self.fBeamPosY = self.getDataInput("beamPosY")[0].getValue()
        if (self.hasDataInput("transmission")):
            self.fTransmission = self.getDataInput("transmission")[0].getValue()
        if (self.hasDataInput("dataCollectionId")):
            self.iDataCollectionId = self.getDataInput("dataCollectionId")[0].getValue()
        if (self.hasDataInput("shortComments")):
            self.strShortComments = self.getDataInput("shortComments")[0].getValue()
        if (self.hasDataInput("comments")):
            self.strComments = self.getDataInput("comments")[0].getValue()
        if (self.hasDataInput("inputCharacterisation")):
            self.xsDataInputCharacterisation = self.getDataInput("inputCharacterisation")[0]
        if (self.hasDataInput("mxv2DataCollection")):
            self.xsDataCollectionMXv2 = self.getDataInput("mxv2DataCollection")[0]

        # Check if XML data is given as input :
        if (self.xsDataInputCharacterisation is None):
            self.edPluginControlSubWedgeAssemble = self.loadPlugin(self.strEDPluginControlSubWedgeAssembleName, "SubWedgeAssemble")

        self.edPluginControlCharacterisation = self.loadPlugin(self.strEDPluginControlCharacterisationName, "Characterisation")

        if (self.strEDPluginControlISPyBName is not None):
            self.edPluginControlISPyB = self.loadPlugin(self.strEDPluginControlISPyBName, "ISPyB")
开发者ID:IvarsKarpics,项目名称:edna-mx,代码行数:69,代码来源:EDPluginControlInterfacev2_0.py

示例4: EDPluginControlInterfacev1_2

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

#.........这里部分代码省略.........
            bUseISPyBPlugin = EDConfiguration.getStringParamValue(pluginConfiguration, "useISPyBPlugin")
            if (bUseISPyBPlugin.lower() != "true"):
                self.strEDPluginControlISPyBName = None


    def preProcess(self, _edPlugin=None):
        """
        Gets the Configuration Parameters, if found, overrides default parameters
        """
        EDPluginControl.preProcess(self, _edPlugin)
        EDVerbose.DEBUG("EDPluginControlInterfacev1_2.preProcess...")

        self.listImagePaths = []

        # Check if XSDataInputInterface is given as input
        if self.hasDataInput():
            xsDataInputInterface = self.getDataInput()

            if xsDataInputInterface.getExperimentalCondition():
                self.xsDataExperimentalCodition = xsDataInputInterface.getExperimentalCondition()
                if self.xsDataExperimentalCodition.getGoniostat():
                    if self.xsDataExperimentalCodition.getGoniostat().getMinOscillationWidth():
                        self.fMinOscillationWidth = self.xsDataExperimentalCodition.getGoniostat().getMinOscillationWidth().getValue()
                    if self.xsDataExperimentalCodition.getGoniostat().getMaxOscillationSpeed():
                        self.fMaxOscillationSpeed = self.xsDataExperimentalCodition.getGoniostat().getMaxOscillationSpeed().getValue()


            self.xsDataSample = xsDataInputInterface.getSample()

            self.xsDataDiffractionPlan = self.getDataInput().getDiffractionPlan()
            if self.xsDataDiffractionPlan:
                if self.xsDataDiffractionPlan.getForcedSpaceGroup():
                    self.strForcedSpaceGroup = self.xsDataDiffractionPlan.getForcedSpaceGroup().getValue()
                if self.xsDataDiffractionPlan.getMaxExposureTimePerDataCollection():
                    self.fMaxExposureTimePerDataCollection = self.xsDataDiffractionPlan.getMaxExposureTimePerDataCollection().getValue()
                if self.xsDataDiffractionPlan.getAnomalousData():
                    self.bAnomalousData = self.xsDataDiffractionPlan.getAnomalousData().getValue()
                if self.xsDataDiffractionPlan.getStrategyOption():
                    self.strStrategyOption = self.xsDataDiffractionPlan.getStrategyOption().getValue()
                if self.xsDataDiffractionPlan.getComplexity():
                    self.strComplexity = self.xsDataDiffractionPlan.getComplexity().getValue()
                if self.fMinOscillationWidth == None:
                    if self.xsDataDiffractionPlan.getGoniostatMinOscillationWidth():
                        self.fMinOscillationWidth = self.xsDataDiffractionPlan.getGoniostatMinOscillationWidth().getValue()
                if self.fMaxOscillationSpeed == None:
                    if self.xsDataDiffractionPlan.getGoniostatMaxOscillationSpeed():
                        self.fMaxOscillationSpeed = self.xsDataDiffractionPlan.getGoniostatMaxOscillationSpeed().getValue()


            self.xsDataSample = xsDataInputInterface.getSample()

            if xsDataInputInterface.getImagePath():
                for xsDataFile in xsDataInputInterface.getImagePath():
                    self.listImagePaths.append(xsDataFile.getPath())

            if xsDataInputInterface.getFlux():
                self.fFlux = xsDataInputInterface.getFlux().getValue()
            elif self.xsDataExperimentalCodition != None:
                if self.xsDataExperimentalCodition.getBeam() != None:
                    if self.xsDataExperimentalCodition.getBeam().getFlux() != None:
                        self.fFlux = self.xsDataExperimentalCodition.getBeam().getFlux().getValue()

            if xsDataInputInterface.getMinExposureTimePerImage():
                self.fMinExposureTimePerImage = xsDataInputInterface.getMinExposureTimePerImage().getValue()
            elif self.xsDataExperimentalCodition != None:
                if self.xsDataExperimentalCodition.getBeam() != None:
开发者ID:antolinos,项目名称:edna,代码行数:70,代码来源:EDPluginControlInterfacev1_2.py


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