本文整理汇总了Python中XSDataMXv1.XSDataDiffractionPlan.getAimedMultiplicity方法的典型用法代码示例。如果您正苦于以下问题:Python XSDataDiffractionPlan.getAimedMultiplicity方法的具体用法?Python XSDataDiffractionPlan.getAimedMultiplicity怎么用?Python XSDataDiffractionPlan.getAimedMultiplicity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XSDataMXv1.XSDataDiffractionPlan
的用法示例。
在下文中一共展示了XSDataDiffractionPlan.getAimedMultiplicity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: diffractionPlan
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getAimedMultiplicity [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: diffractionPlan
# 需要导入模块: from XSDataMXv1 import XSDataDiffractionPlan [as 别名]
# 或者: from XSDataMXv1.XSDataDiffractionPlan import getAimedMultiplicity [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"])