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 (&Aring;)")
     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
0
 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\ndistance (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\n(optimized)"
     else:
         strAimedMultiplicity = "%.2f" % xsDataDiffractionPlan.getAimedMultiplicity(
         ).getValue()
     listRow.append(strAimedMultiplicity)
     # Aimed completeness
     if xsDataDiffractionPlan.getAimedCompleteness() is None:
         strAimedCompleteness = "Default\n(>= 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\n(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"])
 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 (&Aring;)")
     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"])
예제 #4
0
 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 (&Aring;)")
     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()