本文整理汇总了Python中XSDataMXv1.XSDataDiffractionPlan.getForcedSpaceGroup方法的典型用法代码示例。如果您正苦于以下问题:Python XSDataDiffractionPlan.getForcedSpaceGroup方法的具体用法?Python XSDataDiffractionPlan.getForcedSpaceGroup怎么用?Python XSDataDiffractionPlan.getForcedSpaceGroup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XSDataMXv1.XSDataDiffractionPlan
的用法示例。
在下文中一共展示了XSDataDiffractionPlan.getForcedSpaceGroup方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: diffractionPlan
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getForcedSpaceGroup [as 别名]
def diffractionPlan(self):
# Do we have a diffracionPlan?
xsDataDiffractionPlan = self.xsDataResultCharacterisation.getDataCollection().getDiffractionPlan()
if xsDataDiffractionPlan is None:
xsDataDiffractionPlan = XSDataDiffractionPlan()
self.page.h2("Diffraction Plan")
self.page.table(class_="diffractionPlan", border_="1", cellpadding_="0")
self.page.tr(align_="CENTER", bgcolor_=self.strTableColourTitle2)
self.page.th("Forced<br>space group")
self.page.th("Anomalous<br>data")
self.page.th("Aimed<br>multiplicity")
self.page.th("Aimed<br>completeness")
self.page.th("Aimed I/sigma<br>at highest res.")
self.page.th("Aimed<br>resolution (Å)")
self.page.tr.close()
self.page.tr(align_="CENTER", bgcolor_=self.strTableColourRows)
# Forced space group
if xsDataDiffractionPlan.getForcedSpaceGroup() is None:
strForcedSpaceGroup = "None"
else:
strForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup().getValue()
self.page.th(strForcedSpaceGroup)
# Anomalous data
if (
xsDataDiffractionPlan.getAnomalousData() is None
or xsDataDiffractionPlan.getAnomalousData().getValue() == False
):
strAnomalousData = "False"
else:
strAnomalousData = "True"
self.page.th(strAnomalousData)
# Aimed multiplicity
if xsDataDiffractionPlan.getAimedMultiplicity() is None:
strAimedMultiplicity = "Default<br>(optimized)"
else:
strAimedMultiplicity = "%.2f" % xsDataDiffractionPlan.getAimedMultiplicity().getValue()
self.page.th(strAimedMultiplicity)
# Aimed completeness
if xsDataDiffractionPlan.getAimedCompleteness() is None:
strAimedCompleteness = "Default<br>(>= 0.99)"
else:
strAimedCompleteness = "%.2f" % xsDataDiffractionPlan.getAimedCompleteness().getValue()
self.page.th(strAimedCompleteness)
# Aimed aimedIOverSigmaAtHighestResolution
if xsDataDiffractionPlan.getAimedIOverSigmaAtHighestResolution() is None:
strAimedIOverSigmaAtHighestResolution = "BEST Default"
else:
strAimedIOverSigmaAtHighestResolution = (
"%.2f" % xsDataDiffractionPlan.getAimedIOverSigmaAtHighestResolution().getValue()
)
self.page.th(strAimedIOverSigmaAtHighestResolution)
# Aimed resolution
if xsDataDiffractionPlan.getAimedResolution() is None:
strAimedResolution = "Default<br>(highest possible)"
else:
strAimedResolution = "%0.2f" % xsDataDiffractionPlan.getAimedResolution().getValue()
self.page.th(strAimedResolution)
# Close the table
self.page.tr.close()
self.page.table.close()
示例2: EDPluginControlInterfacev1_3
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getForcedSpaceGroup [as 别名]
#.........这里部分代码省略.........
bUseISPyBPlugin = self.config.get("useISPyBPlugin")
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()
示例3: preProcess
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getForcedSpaceGroup [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")
示例4: diffractionPlan
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getForcedSpaceGroup [as 别名]
def diffractionPlan(self):
# Do we have a diffracionPlan?
xsDataDiffractionPlan = self.xsDataResultCharacterisation.getDataCollection().getDiffractionPlan()
if xsDataDiffractionPlan is None:
xsDataDiffractionPlan = XSDataDiffractionPlan()
strTitle = "Diffraction Plan"
strExtraColumnTitle = None
strExtraColumnValue = None
if xsDataDiffractionPlan.strategyOption is not None:
strStrategyOption = xsDataDiffractionPlan.strategyOption.value
if strStrategyOption.find("-helic") != -1:
strTitle = "Helical Diffraction Plan"
self.bIsHelical = True
strExtraColumnTitle = "Helical<br>distance (mm)"
if self.dataInput.helicalDistance is not None:
fHelicalDistance = self.dataInput.helicalDistance.value
strExtraColumnValue = "%.3f" % fHelicalDistance
else:
strExtraColumnValue = "Unknown"
elif strStrategyOption.find("-Npos") != -1:
strTitle = "Multi-positional Diffraction Plan"
self.bIsMultiPositional = True
dictTable = {"type": "table",
"title": "Diffraction Plan",
"columns": [],
"data": []}
dictTable["columns"].append("Forced\nspace group")
dictTable["columns"].append("Anomalous\ndata")
dictTable["columns"].append("Aimed\nmultiplicity")
dictTable["columns"].append("Aimed\ncompleteness")
dictTable["columns"].append("Aimed I/sigma\nat highest res.")
dictTable["columns"].append("Aimed\nresolution (Å)")
dictTable["columns"].append("Min osc.\nwidth")
if strExtraColumnTitle is not None:
dictTable["columns"].append(strExtraColumnTitle)
listRow = []
# Forced space group
if xsDataDiffractionPlan.getForcedSpaceGroup() is None:
strForcedSpaceGroup = "None"
else:
strForcedSpaceGroup = xsDataDiffractionPlan.getForcedSpaceGroup().getValue()
listRow.append(strForcedSpaceGroup)
# Anomalous data
if xsDataDiffractionPlan.getAnomalousData() is None or xsDataDiffractionPlan.getAnomalousData().getValue() == False:
strAnomalousData = "False"
else:
strAnomalousData = "True"
listRow.append(strAnomalousData)
# Aimed multiplicity
if xsDataDiffractionPlan.getAimedMultiplicity() is None:
strAimedMultiplicity = "Default<br>(optimized)"
else:
strAimedMultiplicity = "%.2f" % xsDataDiffractionPlan.getAimedMultiplicity().getValue()
listRow.append(strAimedMultiplicity)
# Aimed completeness
if xsDataDiffractionPlan.getAimedCompleteness() is None:
strAimedCompleteness = "Default<br>(>= 0.99)"
else:
strAimedCompleteness = "%.2f" % xsDataDiffractionPlan.getAimedCompleteness().getValue()
listRow.append(strAimedCompleteness)
# Aimed aimedIOverSigmaAtHighestResolution
if xsDataDiffractionPlan.getAimedIOverSigmaAtHighestResolution() is None:
strAimedIOverSigmaAtHighestResolution = "BEST Default"
else:
strAimedIOverSigmaAtHighestResolution = "%.2f" % xsDataDiffractionPlan.getAimedIOverSigmaAtHighestResolution().getValue()
listRow.append(strAimedIOverSigmaAtHighestResolution)
# Aimed resolution
if xsDataDiffractionPlan.getAimedResolution() is None:
strAimedResolution = "Default<br>(highest possible)"
else:
strAimedResolution = "%0.2f" % xsDataDiffractionPlan.getAimedResolution().getValue()
listRow.append(strAimedResolution)
# Min osc width
if xsDataDiffractionPlan.goniostatMinOscillationWidth is None:
strMinOscWidth = "Default"
else:
strMinOscWidth = "%0.2f" % xsDataDiffractionPlan.goniostatMinOscillationWidth.value
listRow.append(strMinOscWidth)
if strExtraColumnValue is not None:
listRow.append(strExtraColumnValue)
#
dictTable["data"].append(listRow)
self.workflowStepReport.addTable(strTitle,
dictTable["columns"],
dictTable["data"])
示例5: EDPluginControlInterfacev1_2
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getForcedSpaceGroup [as 别名]
#.........这里部分代码省略.........
self.strEDPluginControlISPyBName = self.getControlledPluginName("ispybPlugin")
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()