Example #1
0
 def run(self, in_data):
     outData = {}
     # First get the list of subWedges
     if "subWedge" in in_data:
         list_sub_wedge = in_data["subWedge"]
     else:
         list_sub_wedge = self.getListSubWedge(in_data)
     # # Get list of spots from Dozor
     # listOutDataControlDozor = self.runControlDozor(listSubWedge)
     # listDozorSpotFile = []
     # for outDataControlDozor in listOutDataControlDozor:
     #     if "dozorSpotFile" in outDataControlDozor["imageQualityIndicators"][0]:
     #         dozorSpotFile = outDataControlDozor["imageQualityIndicators"][0][
     #             "dozorSpotFile"
     #         ]
     #         listDozorSpotFile.append(dozorSpotFile)
     # imageDict = listSubWedge[0]
     # Run XDS indexing
     xds_indexin_in_data = {
         "subWedge": list_sub_wedge
         # "dozorSpotFile": listDozorSpotFile,
     }
     xds_indexing_task = XDSIndexing(
         inData=xds_indexin_in_data
         # workingDirectorySuffix=UtilsImage.getPrefix(imageDict["image"][0]["path"]),
     )
     xds_indexing_task.execute()
     resultIndexing = None
     xparm_path = None
     spot_path = None
     if xds_indexing_task.isSuccess():
         xdsIndexingOutData = xds_indexing_task.outData
         if os.path.exists(xdsIndexingOutData["xparmXdsPath"]):
             xparm_path = xdsIndexingOutData["xparmXdsPath"]
         if os.path.exists(xdsIndexingOutData["spotXdsPath"]):
             spot_path = xdsIndexingOutData["spotXdsPath"]
         resultIndexing = ControlIndexing.getResultIndexingFromXds(
             xdsIndexingOutData)
     outData = {
         "resultIndexing": resultIndexing,
         "xparmXdsPath": xparm_path,
         "spotXdsPath": spot_path
     }
     return outData
Example #2
0
 def run(self, inData):
     outData = {}
     # First get the list of subWedges
     if "subWedge" in inData:
         listSubWedge = inData["subWedge"]
     else:
         listSubWedge = self.getListSubWedge(inData)
     # Get list of spots from Dozor
     listOutDataControlDozor = self.runControlDozor(listSubWedge)
     listDozorSpotFile = []
     for outDataControlDozor in listOutDataControlDozor:
         if "dozorSpotFile" in outDataControlDozor["imageQualityIndicators"][0]:
             dozorSpotFile = outDataControlDozor["imageQualityIndicators"][0]["dozorSpotFile"]
             listDozorSpotFile.append(dozorSpotFile)
     imageDict = listSubWedge[0]
     listXdsIndexingTask = []
     listResult = []
     listSpaceGroup = []
     # Run XDS indexing
     xdsIndexinInData = {
         "subWedge": listSubWedge,
         "dozorSpotFile": listDozorSpotFile
     }
     xdsIndexingTask = XDSIndexing(
         inData=xdsIndexinInData,
         workingDirectorySuffix=UtilsImage.getPrefix(imageDict["image"][0]["path"])
     )
     xdsIndexingTask.execute()
     xparmXdsPath = None
     if xdsIndexingTask.isSuccess():
         xdsIndexingOutData = xdsIndexingTask.outData
         xparmXdsPath = xdsIndexingOutData["xparmXdsPath"]
         resultIndexing = ControlIndexing.getResultIndexingFromXds(xdsIndexingOutData)
     outData = {
         "resultIndexing": resultIndexing,
         "resultDozor": listOutDataControlDozor,
         "xparmXdsPath": xparmXdsPath
     }
     return outData
Example #3
0
 def test_execute_XDSIndexing(self):
     referenceDataPath = self.dataPath / 'inDataXDSIndexing.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     xdsIndexing = XDSIndexing(inData=inData)
     xdsIndexing.execute()
     self.assertTrue(xdsIndexing.isSuccess())