• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python test_utils.get_test_process_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: 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


示例2: test_i08_REGRESSION

    def test_i08_REGRESSION(self):
        data_file = tu.get_test_big_data_path('pymca_live_processing_test/i08-10471.nxs')
        process_file = tu.get_test_process_path('i08_pymca_process.nxs')
        outdir = tempfile.mkdtemp(prefix="pymca_i08_test")

        if os.path.exists(outdir):
            shutil.rmtree(outdir)
        os.makedirs(outdir, stat.S_IRWXO | stat.S_IRWXU)

        options = tu.set_options(data_file, process_file=process_file, out_path=outdir)
        run_protected_plugin_runner(options)
        change_permissions_recursive(options['out_path'],
                                     stat.S_IRWXO | stat.S_IRWXU | stat.S_IRWXG)

        output_filename = ("%(out_path)s"+os.sep+"%(out_folder)s_processed.nxs") % options

        f_test = h5.File(output_filename, 'r')  # the result of this test
        test_path = tu.get_test_big_data_path('pymca_live_processing_test/savu_test_result/test_processed.nxs')

        f_known = h5.File(test_path, 'r')  # a known good result from the same data

        # first we just do a direct comparison of the data. This should be equal exactly.
        data = '/entry/final_result_fluo/data'
        elements = 'entry/final_result_fluo/PeakElements'

        self.assertTrue((f_test[data][...] == f_known[data][...]).any())
        self.assertListEqual(list(f_test[elements][...]),
                             list(f_known[elements][...]))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:28,代码来源:i08_pymca_test.py


示例3: 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


示例4: 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


示例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_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


示例8: 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_test_process_path('basic_stxm_process.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:9,代码来源:plugin_runner_test.py


示例9: 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


示例10: 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


示例11: 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


示例12: 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


示例13: 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


示例14: 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_test_process_path('simplefitreconstest.nxs'),
            "process_file": tu.get_test_process_path(
                'testing_mm_sart_recon.nxs'),
            "out_path": tempfile.mkdtemp()
            }
        run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:11,代码来源:simple_fit_recon_test.py


示例15: test_process_preview

 def test_process_preview(self):
     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(
             'i12_tomo_pipeline_preview_test.nxs'),
         "out_path": tempfile.mkdtemp()
         }
     run_protected_plugin_runner(options)
开发者ID:r-atwood,项目名称:Savu,代码行数:11,代码来源:i12_tomo_pipeline_test.py


示例16: create_chunking_instance

 def create_chunking_instance(self, current_list, nnext_list, nProcs):
     current = self.create_pattern('a', current_list)
     nnext = self.create_pattern('b', nnext_list)
     options = tu.set_experiment('tomoRaw')
     options['processes'] = range(nProcs)
     # set a dummy process list
     options['process_file'] = \
         tu.get_test_process_path('basic_tomo_process.nxs')
     exp = Experiment(options)
     test_dict = {'current': current, 'next': nnext}
     chunking = Chunking(exp, test_dict)
     return chunking
开发者ID:FedeMPouzols,项目名称:Savu,代码行数:12,代码来源:chunking_test.py


示例17: test_i14_software

 def test_i14_software(self):
     data_file = tu.get_test_big_data_path('i14-5195.nxs')
     process_file = tu.get_test_process_path('i14_pymca_process.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:5,代码来源:i14_pymca_test.py


示例18: test_stage_motion

 def test_stage_motion(self):
     data_file = tu.get_test_data_path('kinematics_data.nxs')
     process_file = tu.get_test_process_path('kinematic_parser_test.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:5,代码来源:stage_motion_test.py


示例19: test_distortion_correction

 def test_distortion_correction(self):
     data_file = tu.get_test_data_path('24737.nxs')
     process_file = \
         tu.get_test_process_path('distortion_correction_test.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:6,代码来源:distortion_correction_test.py


示例20: test_process

 def test_process(self):
     data_file = tu.get_test_data_path('/i12_test_data/i12_test_data.nxs')
     process_file = tu.get_test_process_path('i12_tomo_pipeline_test.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:rcatwood,项目名称:Savu,代码行数:5,代码来源:i12_tomo_pipeline_test.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python test_utils.set_options函数代码示例发布时间:2022-05-27
下一篇:
Python test_utils.get_test_data_path函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap