From 136d908afbac2b1010b56f8b96081df956f2b8bf Mon Sep 17 00:00:00 2001 From: Edoardo Pasca Date: Tue, 30 Apr 2019 13:57:42 +0100 Subject: added test for center of rotation finder --- Wrappers/Python/test/test_DataProcessor.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Wrappers/Python/test/test_DataProcessor.py b/Wrappers/Python/test/test_DataProcessor.py index 1c1de3a..a5bd9c6 100755 --- a/Wrappers/Python/test/test_DataProcessor.py +++ b/Wrappers/Python/test/test_DataProcessor.py @@ -11,8 +11,29 @@ from timeit import default_timer as timer from ccpi.framework import AX, CastDataContainer, PixelByPixelDataProcessor +from ccpi.io.reader import NexusReader +from ccpi.processors import CenterOfRotationFinder +import wget +import os + class TestDataProcessor(unittest.TestCase): + def setUp(self): + wget.download('https://github.com/DiamondLightSource/Savu/raw/master/test_data/data/24737_fd.nxs') + self.filename = '24737_fd.nxs' + + def tearDown(self): + os.remove(self.filename) + def test_CenterOfRotation(self): + reader = NexusReader(self.filename) + ad = reader.get_acquisition_data_whole() + print (ad.geometry) + cf = CenterOfRotationFinder() + cf.set_input(ad) + print ("Center of rotation", cf.get_output()) + + + def test_DataProcessorChaining(self): shape = (2,3,4,5) size = shape[0] -- cgit v1.2.3