当前位置: 首页>>代码示例>>Python>>正文


Python test_utils.get_test_data_path函数代码示例

本文整理汇总了Python中savu.test.test_utils.get_test_data_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_test_data_path函数的具体用法?Python get_test_data_path怎么用?Python get_test_data_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_test_data_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        self.test_folder = tempfile.mkdtemp(suffix='template_test/')
        self.tif_folder = os.path.join(self.test_folder, 'tiffs/')
        os.mkdir(self.tif_folder)

        # copy across the process list to the working directory
        self.process_list_path = os.path.join(self.test_folder, 'xrd_template_test.nxs')
        shutil.copyfile(tu.get_test_process_path('xrd_template_test.nxs'),
                        self.process_list_path)

        utils.populate_plugins()
        self.process_list = Content()
        self.process_list.fopen(self.process_list_path, update=False)
        for idx in self.process_list.get_positions():
            self.process_list.refresh(idx)
        self.detX_axis_label = {'dim': '$idx_detx', 'name': 'detector_x', 'value': None, 'units': 'pixels'}
        self.detY_axis_label = {'dim': '$idx_dety', 'name': 'detector_y', 'value': None, 'units': 'pixels'}

        self.yaml = OrderedDict()
        # now make some standard modifications
        self.yaml['inherit'] = [tu.get_test_data_path(os.path.join('i18_templates', 'xrd_calibration.yml'))]
        self.yaml['xrd'] = OrderedDict()
        self.yaml['xrd']['params'] = {}
        self.yaml['xrd']['data'] = {}
        self.yaml['xrd']['data']['folder'] = self.tif_folder
        self.yaml['xrd']['params']['cfile'] = \
            "$h5py.File('%s', 'r')" % tu.get_test_data_path('LaB6_calibration_new.nxs')

        self.yaml['xrd']['patterns'] = {}
        self.yaml['xrd']['patterns']['DIFFRACTION'] = {'core_dims': '$(idx_detx, idx_dety)',
                                                       'slice_dims': '$tuple([d for d in dims if d not in [idx_detx, idx_dety]])'}
        self.yaml['xrd']['axis_labels'] = {}
        self.yaml['xrd']['metadata'] = {}
        self.data_file_path = 'test_data.nxs'
        self.data_file = h5.File(self.data_file_path, 'w')  # this will have the axes in.
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:35,代码来源:template_loader_test.py

示例2: test_process

 def test_process(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('stxm.nxs'),
         "process_file": tu.get_test_data_path('basic_stxm_process.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:mjn19172,项目名称:Savu,代码行数:9,代码来源:plugin_runner_test.py

示例3: test_FastXrf

 def test_FastXrf(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('fluo.nxs'),
         "process_file": tu.get_test_data_path('basic_fastxrf_process.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     PluginRunner(options)
开发者ID:mjn19172,项目名称:Savu,代码行数:9,代码来源:fastxrf_test.py

示例4: test_i18_stxm

    def test_i18_stxm(self):
#         data_file = '/dls/i18/data/2016/sp12601-1/processing/Savu_Test_Data/70214_Cat2_RT_1.nxs'
        data_file = tu.get_test_data_path('i18_test_data.nxs')
        process_file = tu.get_test_process_path('basic_stxm_process_i18.nxs')
#         process_file = tu.get_process_list_path('stxm_tomo_i18.nxs')
        run_protected_plugin_runner(tu.set_options(data_file,
                                                   process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:7,代码来源:i18_stxm_loader_test.py

示例5: test_diffraction_correction

    def test_diffraction_correction(self):
        data_file = tu.get_test_data_path('i18_test_data.nxs')

#         data_file = '/dls/i18/data/2016/sp13939-1/Experiment_1/nexus/75996_alphanitrateRT_1.nxs'
        process_file = tu.get_test_process_path('diffraction_absorption_correction_test.nxs')
        run_protected_plugin_runner(tu.set_options(data_file,
                                                   process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:7,代码来源:diffraction_absorption_test.py

示例6: test_simple_fit_runs

    def test_simple_fit_runs(self):
#         data_file = '/dls/i13-1/data/2016/mt14190-1/raw/91318.nxs'#
        data_file = tu.get_test_data_path('i18_test_data.nxs')
        process_file = tu.get_test_process_path('pymca_test.nxs')
#         process_file = '/dls/i13-1/data/2016/mt14190-1/processing/savu/process_lists/pymca_process.nxs'
        options = tu.set_options(data_file, process_file=process_file)
        self.datapath = options['out_path']
        run_protected_plugin_runner(options)
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:8,代码来源:pymca_test.py

示例7: test_stxm_tomo_astra

 def test_stxm_tomo_astra(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('mm.nxs'),
         "process_file": tu.get_test_process_path('simple_stxm_tomo_test_astra.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:9,代码来源:stxm_tomo_test.py

示例8: test_fbp

 def test_fbp(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('24737.nxs'),
         "process_file": tu.get_test_process_path('miro_test.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:9,代码来源:full_recon_test.py

示例9: test_process

 def test_process(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path("mm.nxs"),
         "process_file": tu.get_process_list_path("I18_pipeline_just_xrd.nxs"),
         "out_path": tempfile.mkdtemp(),
     }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:9,代码来源:i18_xrd_pipeline_test.py

示例10: test_reload

 def test_reload(self):
     data_file = tu.get_test_data_path('24737.nxs')
     process_file = tu.get_test_process_path('savu_nexus_loader_test1.nxs')
     exp = run_protected_plugin_runner(
             tu.set_options(data_file, process_file=process_file))
     data_file = exp.meta_data.get('nxs_filename')
     process_file = tu.get_test_process_path('savu_nexus_loader_test2.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:9,代码来源:savu_nexus_loader_test.py

示例11: test_monitor_correction

 def test_monitor_correction(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('mm.nxs'),
         "process_file": tu.get_test_process_path('monitor_correction_test.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:9,代码来源:monitor_correction_test.py

示例12: test_cgls_astra

 def test_cgls_astra(self):
     process = 'basic_tomo_iterative_process.nxs'
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('24737.nxs'),
         "process_file": tu.get_test_process_path(process),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:10,代码来源:CGLS_astra_test.py

示例13: test_mm

 def test_mm(self):
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('mm.nxs'),
         "process_file": tu.get_test_process_path(
             'multiple_mm_inputs_test.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:10,代码来源:data_reduction_test.py

示例14: test_multi_params_tomo

 def test_multi_params_tomo(self):
     process = 'basic_tomo_process_preview_params_test.nxs'
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path('24737.nxs'),
         "process_file": tu.get_test_process_path(process),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:10,代码来源:multiple_parameter_process_lists_test.py

示例15: test_multi_params_i12tomo

 def test_multi_params_i12tomo(self):
     process = 'i12_tomo_pipeline_test.nxs'
     options = {
         "transport": "hdf5",
         "process_names": "CPU0",
         "data_file": tu.get_test_data_path(
             'i12_test_data/i12_test_data.nxs'),
         "process_file": tu.get_test_process_path(process),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:11,代码来源:multiple_parameter_process_lists_test.py


注:本文中的savu.test.test_utils.get_test_data_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。