summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2019-04-30 13:57:42 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2019-04-30 13:57:42 +0100
commit136d908afbac2b1010b56f8b96081df956f2b8bf (patch)
tree2cb7b1e8ff19f9b2f69792ad939245033e3a718c
parent64ad60acb5c2a993e9b61682c18105723d9ae912 (diff)
downloadframework-136d908afbac2b1010b56f8b96081df956f2b8bf.tar.gz
framework-136d908afbac2b1010b56f8b96081df956f2b8bf.tar.bz2
framework-136d908afbac2b1010b56f8b96081df956f2b8bf.tar.xz
framework-136d908afbac2b1010b56f8b96081df956f2b8bf.zip
added test for center of rotation finder
-rwxr-xr-xWrappers/Python/test/test_DataProcessor.py21
1 files changed, 21 insertions, 0 deletions
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]