diff options
| author | Edoardo Pasca <edo.paskino@gmail.com> | 2019-04-30 13:57:42 +0100 | 
|---|---|---|
| committer | Edoardo Pasca <edo.paskino@gmail.com> | 2019-04-30 13:57:42 +0100 | 
| commit | 136d908afbac2b1010b56f8b96081df956f2b8bf (patch) | |
| tree | 2cb7b1e8ff19f9b2f69792ad939245033e3a718c | |
| parent | 64ad60acb5c2a993e9b61682c18105723d9ae912 (diff) | |
| download | framework-136d908afbac2b1010b56f8b96081df956f2b8bf.tar.gz framework-136d908afbac2b1010b56f8b96081df956f2b8bf.tar.bz2 framework-136d908afbac2b1010b56f8b96081df956f2b8bf.tar.xz framework-136d908afbac2b1010b56f8b96081df956f2b8bf.zip  | |
added test for center of rotation finder
| -rwxr-xr-x | Wrappers/Python/test/test_DataProcessor.py | 21 | 
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]
  | 
