예제 #1
0
 def tes_execute_MosflmIndexingTask_TRYP_X1_4(self):
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0001.cbf')
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0002.cbf')
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0003.cbf')
     UtilsTest.loadTestImage('ref-TRYP-X1_4_0004.cbf')
     referenceDataPath = self.dataPath / 'mosflm_indexing_TRYP-X1_4.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     mosflmIndexingTask = MosflmIndexingTask(inData=inData)
     mosflmIndexingTask.execute()
     self.assertTrue(mosflmIndexingTask.isSuccess())
예제 #2
0
 def test_generateMOSFLMCommands_indexing(self):
     tempdir = tempfile.mkdtemp(prefix='generateMOSFLMCommands_indexing_test_')
     tmpWorkingDir = pathlib.Path(tempdir)
     referenceDataPath = self.dataPath / 'mosflm_abstract_input.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     task = MosflmIndexingTask(inData)
     listCommands = task.generateMOSFLMCommands(inData, tmpWorkingDir)
     for requiredItem in ['BEAM', 'DETECTOR', 'OMEGA', 'REVERSEPHI',
                          'DIRECTORY', 'TEMPLATE', 'LIMITS EXCLUDE',
                          'RASTER', 'POLARIZATION']:
         self.assertTrue(requiredItem in ' '.join(listCommands))
     shutil.rmtree(tempdir)
예제 #3
0
 def test_parseIndexingMosflmOutput(self):
     newMatFilePath = self.dataPath / 'newmat.txt'
     dnaTablesPath = self.dataPath / 'indexingTwoImagesDnaTables.xml'
     task = MosflmIndexingTask(inData={})
     outData = task.parseIndexingMosflmOutput(newMatFilePath, dnaTablesPath)
     for parameter in ['newmat', 'mosaicityEstimation', 'deviationAngular',
                       'refinedDistance', 'spotsUsed', 'spotsTotal',
                       'selectedSolutionNumber',
                       'selectedSolutionSpaceGroup',
                       'selectedSolutionSpaceGroupNumber',
                       'indexingSolution']:
         self.assertTrue(parameter in outData, parameter)
예제 #4
0
 def test_parseIndexingMosflmOutput(self):
     newMatFilePath = self.dataPath / "newmat.txt"
     dnaTablesPath = self.dataPath / "indexingTwoImagesDnaTables.xml"
     task = MosflmIndexingTask(inData={})
     outData = task.parseIndexingMosflmOutput(newMatFilePath, dnaTablesPath)
     for parameter in [
             "newmat",
             "mosaicityEstimation",
             "deviationAngular",
             "refinedDistance",
             "spotsUsed",
             "spotsTotal",
             "selectedSolutionNumber",
             "selectedSolutionSpaceGroup",
             "selectedSolutionSpaceGroupNumber",
             "indexingSolution",
     ]:
         self.assertTrue(parameter in outData, parameter)
예제 #5
0
 def test_generateMOSFLMCommands_indexing(self):
     tempdir = tempfile.mkdtemp(
         prefix="generateMOSFLMCommands_indexing_test_")
     tmpWorkingDir = pathlib.Path(tempdir)
     referenceDataPath = self.dataPath / "mosflm_abstract_input.json"
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     task = MosflmIndexingTask(inData)
     listCommands = task.generateMOSFLMCommands(inData, tmpWorkingDir)
     for requiredItem in [
             "BEAM",
             "DETECTOR",
             "OMEGA",
             "REVERSEPHI",
             "DIRECTORY",
             "TEMPLATE",
             "LIMITS EXCLUDE",
             "RASTER",
             "POLARIZATION",
     ]:
         self.assertTrue(requiredItem in " ".join(listCommands))
     shutil.rmtree(tempdir)
예제 #6
0
 def test_execute_MosflmIndexingTask_TRYP_X1_4(self):
     referenceDataPath = self.dataPath / 'TRYP-X1_4.json'
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     mosflmIndexingTask = MosflmIndexingTask(inData=inData)
     mosflmIndexingTask.execute()
     self.assertTrue(mosflmIndexingTask.isSuccess())
예제 #7
0
 def test_execute_MosflmIndexingTask_fae_3(self):
     referenceDataPath = self.dataPath / "mosflm_indexing_fae_3.json"
     inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath)
     mosflmIndexingTask = MosflmIndexingTask(inData=inData)
     mosflmIndexingTask.execute()
     self.assertTrue(mosflmIndexingTask.isSuccess())