def test_execute_pilatus6m_10images_crystfel(self): referenceDataPath = self.dataPath / 'pilatus6m_10images_crystfel.json' inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath) task = ImageQualityIndicators(inData=inData) task.execute() self.assertFalse(task.isFailure()) outData = task.outData self.assertTrue('imageQualityIndicators' in outData)
def test_execute(self): referenceDataPath = self.dataPath / "bes_328.json" inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath) task = ImageQualityIndicators(inData=inData) task.execute() self.assertFalse(task.isFailure()) outData = task.outData self.assertTrue("imageQualityIndicators" in outData)
def test_execute(self): referenceDataPath = self.dataPath / 'id30a1.json' inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath) task = ImageQualityIndicators(inData=inData) task.execute() self.assertFalse(task.isFailure()) outData = task.outData self.assertTrue('imageQualityIndicators' in outData) self.assertEqual(304, len(outData['imageQualityIndicators']))
def test_execute_eiger4m_h5_10images(self): referenceDataPath = self.dataPath / "eiger4m_h5_10images.json" inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath) task = ImageQualityIndicators(inData=inData) task.execute() self.assertFalse(task.isFailure()) outData = task.outData self.assertTrue("imageQualityIndicators" in outData) self.assertEqual(len(outData["imageQualityIndicators"]), 51)
def test_execute(self): referenceDataPath = self.dataPath / "inDataImageQualityIndicatorsTask.json" inData = UtilsTest.loadAndSubstitueTestData(referenceDataPath) task = ImageQualityIndicators(inData=inData) task.execute() self.assertFalse(task.isFailure()) outData = task.outData self.assertTrue("imageQualityIndicators" in outData) # self.assertTrue('resolution_limit' in outData['crystfel_results'][0]) self.assertEqual(72, len(outData["imageQualityIndicators"]))
def testGetH5FilePath_fastMesh(self): filePath2 = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20171017/RAW_DATA/" + "mesh2/MeshScan_02/mesh-opid30a3_2_0021.cbf") ( h5MasterFilePath2, h5DataFilePath2, h5FileNumber2, ) = ImageQualityIndicators.getH5FilePath(filePath2, batchSize=20, isFastMesh=True) h5MasterFilePath2Reference = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20171017/RAW_DATA/" + "mesh2/MeshScan_02/mesh-opid30a3_2_1_master.h5") self.assertEqual(h5MasterFilePath2, h5MasterFilePath2Reference, "master path2") h5DataFilePath2Reference = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20171017/RAW_DATA/" + "mesh2/MeshScan_02/mesh-opid30a3_2_1_data_000001.h5") self.assertEqual(h5DataFilePath2, h5DataFilePath2Reference, "data path2") # # fast mesh 2 # filePath2 = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20171017/RAW_DATA/mesh2" + "/MeshScan_02/mesh-opid30a3_2_0321.cbf") ( h5MasterFilePath2, h5DataFilePath2, h5FileNumber2, ) = ImageQualityIndicators.getH5FilePath(filePath2, batchSize=20, isFastMesh=True) h5MasterFilePath2Reference = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20171017/RAW_DATA/mesh2/" + "MeshScan_02/mesh-opid30a3_2_1_master.h5") self.assertEqual(h5MasterFilePath2, h5MasterFilePath2Reference, "master path2") h5DataFilePath2Reference = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20171017/RAW_DATA/mesh2/" + "MeshScan_02/mesh-opid30a3_2_1_data_000004.h5") self.assertEqual(h5DataFilePath2, h5DataFilePath2Reference, "data path2")
def testGetH5FilePath(self): filePath1 = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20160204/RAW_DATA/" + "meshtest/XrayCentering_01/mesh-meshtest_1_0001.cbf") ( h5MasterFilePath1, h5DataFilePath1, h5FileNumber, ) = ImageQualityIndicators.getH5FilePath(filePath1, 9) h5MasterFilePath1Reference = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20160204/RAW_DATA/" + "meshtest/XrayCentering_01/mesh-meshtest_1_1_master.h5") h5DataFilePath1Reference = pathlib.Path( "/data/id30a3/inhouse/opid30a3/20160204/RAW_DATA/" + "meshtest/XrayCentering_01/mesh-meshtest_1_1_data_000001.h5") self.assertEqual(h5MasterFilePath1, h5MasterFilePath1Reference, "masterPath1") self.assertEqual(h5DataFilePath1, h5DataFilePath1Reference, "dataPath1")