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

Python plugin_runner_test.run_protected_plugin_runner函数代码示例

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

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



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

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


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


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


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


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


示例6: test_3D_data

    def test_3D_data(self):
        A = 3
        B = 4
        C = 5

        X = 10
        Y = 13
        expected_output_shape = (A, B, C, X, Y)
        expected_top_corners = np.arange(A*B*C, dtype=np.float32).reshape((A, B, C))

        self.create_N_tiffs(A*B*C, frame_size=(X, Y))
        # create a data file with the axis information
        self.data_file['entry/A'] = np.arange(A)
        self.data_file['entry/B'] = np.arange(B)
        self.data_file['entry/C'] = np.arange(C)
        self.data_file.close()

        # edit and save the yaml
        self.yaml['xrd']['data']['shape'] = '$(len(A_vals), len(B_vals), len(C_vals))'
        self.yaml['xrd']['params'].update({'idx_A': 0,
                                           'idx_B': 1,
                                           'idx_C': 2,
                                           'idx_detx': 3,
                                           'idx_dety': 4,
                                           'A_vals': "$dfile['entry/A'].value",
                                           'B_vals': "$dfile['entry/B'].value",
                                           'C_vals': "$dfile['entry/C'].value",
                                           'dims': "$range(0, 4)"})

        self.yaml['xrd']['axis_labels'] = {0: {'dim': '$idx_A', 'name': 'A', 'value': '$A_vals', 'units': 'pixels'},
                                           1: {'dim': '$idx_B', 'name': 'B', 'value': '$B_vals', 'units': 'pixels'},
                                           2: {'dim': '$idx_C', 'name': 'C', 'value': '$C_vals', 'units': 'pixels'},
                                           3: self.detX_axis_label,
                                           4: self.detY_axis_label}

        self.save_yaml_and_change_process_list()

        run_protected_plugin_runner(tu.set_options(self.data_file_path,
                                                   process_file=self.process_list_path,
                                                   out_path=self.test_folder))

        result = h5.File(os.path.join(self.test_folder, 'test_processed.nxs'), 'r')['entry/final_result_xrd/data']
        np.testing.assert_array_equal(result.shape, expected_output_shape,
                                      err_msg='The output shape is not as expected.')
        result_corners = result[..., -1, -1]
        np.testing.assert_equal(result_corners.dtype, expected_top_corners.dtype,
                                err_msg='The array does not output the correct type.')
        np.testing.assert_array_equal(result_corners, expected_top_corners,
                                      err_msg="The output values are not as expected")
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:49,代码来源:template_loader_test.py


示例7: test_nx_stxm

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


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


示例9: test_process_preview

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


示例10: test_multi_params_tomo

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


示例11: test_process

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


示例12: test_cgls_recon

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


示例13: test_binary_quantisation_filter

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


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


示例15: test_subpixel_shift

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


示例16: test_process

 def test_process(self):
     data_file = tu.get_test_big_data_path('xrd_tomo_p3_astra_recon_cpu.h5')
     process_file = tu.get_test_process_path('ica_test.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:5,代码来源:component_analysis_test.py


示例17: test_process

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


示例18: test_ptycho

 def test_ptycho(self):
     data_file = '/dls/mx-scratch/savu_test_data/NXptychoflipped.nxs'
     process_file = tu.get_test_process_path('ptycho_test.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:DiamondLightSource,项目名称:Savu,代码行数:5,代码来源:dummy_ptycho_test.py


示例19: test_chunking

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


示例20: test_mm

 def test_mm(self):
     data_file = tu.get_test_data_path('mm.nxs')
     process_file = tu.get_test_process_path('multiple_mm_inputs_test.nxs')
     run_protected_plugin_runner(tu.set_options(data_file,
                                                process_file=process_file))
开发者ID:FedeMPouzols,项目名称:Savu,代码行数:5,代码来源:multiple_datasets_test.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python rest_client.RestClient类代码示例发布时间:2022-05-27
下一篇:
Python test_utils.set_options函数代码示例发布时间: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