Beispiel #1
0
    def test6_parallel(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        processes = ['p'] * 15
        params = {'size': (4500, 1, 1)}  # data size is (4496, 1, 1)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', processes)
        self.__assert(pData, sl_dict, 30, 1, 10, 30, 4496)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', processes)
        self.__assert(pData, sl_dict, 30, 30, 10, 1, 4496)
Beispiel #2
0
    def test5_parallel(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        processes = ['p'] * 15
        params = {'size': (24, 1, 1)}  # data size is (20, 1, 1)
        sys_file = self.__get_system_parameters_file()
        data, pData = tu.get_data_object(
            tu.load_random_data(loader, params, system_params=sys_file))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', processes)
        self.__assert(pData, sl_dict, 2, 1, 1, 2, 20)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', processes)
        self.__assert(pData, sl_dict, 2, 2, 1, 1, 20)
Beispiel #3
0
    def test3_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val.unit'] * 5
        params['size'] = (15, 13, 1, 1, 4)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 15, 1, 52, 15, 15 * 13 * 4)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 15, 15, 52, 1, 15 * 13 * 4)
    def test6_parallel(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        processes = ['p']*15
        params = {'size': (4500, 1, 1)}  # data size is (4496, 1, 1)
        sys_file = self.__get_system_parameters_file()        
        data, pData = tu.get_data_object(tu.load_random_data(
                loader, params, system_params=sys_file))

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'single', 'in', processes)
        self.__assert(pData, sl_dict, 30, 1, 10, 30, 4496)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'multiple', 'in', processes)
        self.__assert(pData, sl_dict, 30, 30, 10, 1, 4496)
Beispiel #5
0
    def test2_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val%d.unit' % i for i in range(5)]
        params['size'] = (1, 1, 1, 1, 1)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 1, 1, 1, 1, 1)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 1, 1, 1, 1, 1)
Beispiel #6
0
    def test3_single_threaded(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        params = {'size': (45, 1, 1)}  # data size is (41, 1, 1)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 21, 1, 2, 21, nframes=41)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 21, 21, 2, 1, nframes=41)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION', 17,
                                             'in', 'p')
        self.__assert(pData, sl_dict, 17, 17, 3, 1)
Beispiel #7
0
    def test2_single_threaded(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        params = {'size': (313, 1, 1)}  # data size is (309, 1, 1)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 31, 1, 10, 31, nframes=309)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 31, 31, 10, 1, nframes=309)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION', 5,
                                             'in', 'p')
        self.__assert(pData, sl_dict, 20, 5, 16, 4)
Beispiel #8
0
    def test8_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val.unit'] * 5
        params['size'] = (450, 36, 1, 1, 14)
        processes = ['p'] * 36
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', processes)
        self.__assert(pData, sl_dict, 30, 1, 210, 30, 210 * 36 * 14)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', processes)
        self.__assert(pData, sl_dict, 30, 30, 210, 1, 210 * 36 * 14)
Beispiel #9
0
    def test4_single_threaded(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        params = {'size': (4500, 1, 1)}  # data size is (4496, 1, 1)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 16, 1, 281, 16, nframes=4496)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 16, 16, 281, 1, nframes=4496)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION', 6,
                                             'in', 'p')
        self.__assert(pData, sl_dict, 18, 6, 250, 3)
Beispiel #10
0
    def test1_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val%d.unit' % i for i in range(5)]
        params['size'] = (4, 3, 1, 1, 4)
        sys_file = self.__get_system_parameters_file()
        data, pData = tu.get_data_object(
            tu.load_random_data(loader, params, system_params=sys_file))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 24, 1, 2, 24, 4 * 3 * 4)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 24, 4, 2, 6, 4 * 3 * 4)
    def test3_single_threaded(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        params = {'size': (45, 1, 1)}  # data size is (41, 1, 1)
        sys_file = self.__get_system_parameters_file()
        data, pData = tu.get_data_object(tu.load_random_data(
                loader, params, system_params=sys_file))

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'single', 'in', 'p')
        self.__assert(pData, sl_dict, 21, 1, 2, 21, nframes=41)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 21, 21, 2, 1, nframes=41)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 17, 'in', 'p')
        self.__assert(pData, sl_dict, 17, 17, 3, 1)
Beispiel #12
0
    def test8_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val%d.unit' % i for i in range(5)]
        params['size'] = (450, 36, 1, 1, 14)
        processes = ['p'] * 36
        sys_file = self.__get_system_parameters_file()
        data, pData = tu.get_data_object(
            tu.load_random_data(loader, params, system_params=sys_file))
        data.dtype = np.dtype(np.float32)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', processes)
        self.__assert(pData, sl_dict, 30, 1, 210, 30, 210 * 36 * 14)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', processes)
        self.__assert(pData, sl_dict, 30, 30, 210, 1, 210 * 36 * 14)
    def test8_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val%d.unit' % i for i in range(5)]
        params['size'] = (450, 36, 1, 1, 14)
        processes = ['p']*36
        sys_file = self.__get_system_parameters_file()        
        data, pData = tu.get_data_object(tu.load_random_data(
                loader, params, system_params=sys_file))
        data.dtype = np.dtype(np.float32)        

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'single', 'in', processes)
        self.__assert(pData, sl_dict, 30, 1, 210, 30, 210*36*14)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'multiple', 'in', processes)
        self.__assert(pData, sl_dict, 30, 30, 210, 1, 210*36*14)
Beispiel #14
0
    def test1_parallel(self):
        loader = "random_hdf5_loader"
        params = {}
        processes = ['p']*20        
        params['patterns'] = ['PROJECTION.0s.1s.2c.3c.4s']
        params['axis_labels'] = ['val%d.unit' % i for i in range(5)]
        params['size'] = (4, 3, 1, 1, 4)
        sys_file = self.__get_system_parameters_file()
        data, pData = tu.get_data_object(tu.load_random_data(
                loader, params, system_params=sys_file, fake=True))
        data.dtype = np.dtype(np.float32)        

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'single', 'in', processes)
        self.__assert(pData, sl_dict, 3, 1, 2, 3, nframes=4*3*4)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 4, 4, 12, 1, 4*3*4)
Beispiel #15
0
    def test1_single_threaded(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        params = {'size': (140, 1, 1)}  # data size is (136, 1, 1)
        data, pData = tu.get_data_object(tu.load_random_data(loader, params))

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'single', 'in', 'p')
        self.__assert(pData, sl_dict, 17, 1, 8, 17, nframes=136)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION',
                                             'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 17, 17, 8, 1, nframes=136)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION', 8,
                                             'in', 'p')
        self.__assert(pData, sl_dict, 16, 8, 9, 2)

        sl_dict = self.__get_slice_list_dict(data, pData, 'PROJECTION', 3,
                                             'in', 'p')
        self.__assert(pData, sl_dict, 18, 3, 8, 6)
    def test1_single_threaded(self):
        loader = "full_field_loaders.random_3d_tomo_loader"
        params = {'size': (140, 1, 1)}  # data size is (136, 1, 1)
        sys_file = self.__get_system_parameters_file()
        data, pData = tu.get_data_object(tu.load_random_data(
                loader, params, system_params=sys_file))

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'single', 'in', 'p')
        self.__assert(pData, sl_dict, 17, 1, 8, 17, nframes=136)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 'multiple', 'in', 'p')
        self.__assert(pData, sl_dict, 17, 17, 8, 1, nframes=136)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 8, 'in', 'p')
        self.__assert(pData, sl_dict, 16, 8, 9, 2)

        sl_dict = self.__get_slice_list_dict(
                data, pData, 'PROJECTION', 3, 'in', 'p')
        self.__assert(pData, sl_dict, 18, 3, 8, 6)