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

Python state_gui_model.StateGuiModel类代码示例

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

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



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

示例1: test_create_gui_state_from_userfile_adds_save_format_from_gui

    def test_create_gui_state_from_userfile_adds_save_format_from_gui(self):
        gui_state = StateGuiModel({})
        gui_state.save_types = [SaveType.NXcanSAS]

        row_state = create_gui_state_from_userfile('MaskLOQData.txt', gui_state)

        self.assertEqual(gui_state.save_types, row_state.save_types)
开发者ID:samueljackson92,项目名称:mantid,代码行数:7,代码来源:create_state_test.py


示例2: test_that_can_set_transmission_roi_mask_and_radius

 def test_that_can_set_transmission_roi_mask_and_radius(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.transmission_roi_files = "roi.xml"
     state_gui_model.transmission_mask_files = "mask.xml"
     state_gui_model.transmission_radius = 8.
     self.assertTrue(state_gui_model.transmission_roi_files == "roi.xml")
     self.assertTrue(state_gui_model.transmission_mask_files == "mask.xml")
     self.assertTrue(state_gui_model.transmission_radius == 8)
开发者ID:DanNixon,项目名称:mantid,代码行数:8,代码来源:state_gui_model_test.py


示例3: test_that_phi_mask_can_be_set

 def test_that_phi_mask_can_be_set(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.phi_limit_min = 12.
     state_gui_model.phi_limit_max = 13.
     state_gui_model.phi_limit_use_mirror = True
     self.assertTrue(state_gui_model.phi_limit_min == 12.)
     self.assertTrue(state_gui_model.phi_limit_max == 13.)
     self.assertTrue(state_gui_model.phi_limit_use_mirror)
开发者ID:DanNixon,项目名称:mantid,代码行数:8,代码来源:state_gui_model_test.py


示例4: test_that_can_set_transmission_monitor

 def test_that_can_set_transmission_monitor(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.transmission_incident_monitor = 2
     state_gui_model.transmission_interpolate = True
     self.assertTrue(state_gui_model.transmission_incident_monitor == 2)
     self.assertTrue(state_gui_model.transmission_interpolate)
     # # Reassign
     state_gui_model.transmission_incident_monitor = 3
     self.assertTrue(state_gui_model.transmission_incident_monitor == 3)
开发者ID:DanNixon,项目名称:mantid,代码行数:9,代码来源:state_gui_model_test.py


示例5: test_that_can_set_normalize_to_monitor

 def test_that_can_set_normalize_to_monitor(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.normalization_incident_monitor = 2
     state_gui_model.normalization_interpolate = True
     self.assertTrue(state_gui_model.normalization_incident_monitor == 2)
     self.assertTrue(state_gui_model.normalization_interpolate)
     # Reassign
     state_gui_model.normalization_incident_monitor = 3
     self.assertTrue(state_gui_model.normalization_incident_monitor == 3)
开发者ID:DanNixon,项目名称:mantid,代码行数:9,代码来源:state_gui_model_test.py


示例6: test_that_can_set_transmission_fit_options

 def test_that_can_set_transmission_fit_options(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.transmission_sample_fit_type = FitType.Logarithmic
     state_gui_model.transmission_can_fit_type = FitType.Linear
     state_gui_model.transmission_sample_polynomial_order = 2
     state_gui_model.transmission_can_polynomial_order = 2
     self.assertTrue(state_gui_model.transmission_sample_fit_type is FitType.Logarithmic)
     self.assertTrue(state_gui_model.transmission_can_fit_type is FitType.Linear)
     self.assertTrue(state_gui_model.transmission_sample_polynomial_order == 2)
     self.assertTrue(state_gui_model.transmission_can_polynomial_order == 2)
开发者ID:DanNixon,项目名称:mantid,代码行数:10,代码来源:state_gui_model_test.py


示例7: test_that_adjustment_files_can_be_set

 def test_that_adjustment_files_can_be_set(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.wavelength_adjustment_det_1 = "wav1.txt"
     state_gui_model.wavelength_adjustment_det_2 = "wav2.txt"
     state_gui_model.pixel_adjustment_det_1 = "pix1.txt"
     state_gui_model.pixel_adjustment_det_2 = "pix2.txt"
     self.assertTrue(state_gui_model.wavelength_adjustment_det_1 == "wav1.txt")
     self.assertTrue(state_gui_model.wavelength_adjustment_det_2 == "wav2.txt")
     self.assertTrue(state_gui_model.pixel_adjustment_det_1 == "pix1.txt")
     self.assertTrue(state_gui_model.pixel_adjustment_det_2 == "pix2.txt")
开发者ID:DanNixon,项目名称:mantid,代码行数:10,代码来源:state_gui_model_test.py


示例8: test_that_can_set_wavelength

 def test_that_can_set_wavelength(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.wavelength_min = 1.
     state_gui_model.wavelength_max = 2.
     state_gui_model.wavelength_step = .5
     state_gui_model.wavelength_step_type = RangeStepType.Lin
     state_gui_model.wavelength_step_type = RangeStepType.Log
     self.assertTrue(state_gui_model.wavelength_min == 1.)
     self.assertTrue(state_gui_model.wavelength_max == 2.)
     self.assertTrue(state_gui_model.wavelength_step == .5)
     self.assertTrue(state_gui_model.wavelength_step_type is RangeStepType.Log)
开发者ID:DanNixon,项目名称:mantid,代码行数:11,代码来源:state_gui_model_test.py


示例9: test_that_transmission_fit_wavelength_can_be_set

    def test_that_transmission_fit_wavelength_can_be_set(self):
        state_gui_model = StateGuiModel({"test": [1]})
        state_gui_model.transmission_sample_wavelength_min = 1.3
        state_gui_model.transmission_sample_wavelength_max = 10.3
        state_gui_model.transmission_can_wavelength_min = 1.3
        state_gui_model.transmission_can_wavelength_max = 10.3

        self.assertTrue(state_gui_model.transmission_sample_wavelength_min == 1.3)
        self.assertTrue(state_gui_model.transmission_sample_wavelength_max == 10.3)
        self.assertTrue(state_gui_model.transmission_can_wavelength_min == 1.3)
        self.assertTrue(state_gui_model.transmission_can_wavelength_max == 10.3)
开发者ID:DanNixon,项目名称:mantid,代码行数:11,代码来源:state_gui_model_test.py


示例10: test_that_can_set_the_q_limits

    def test_that_can_set_the_q_limits(self):
        state_gui_model = StateGuiModel({"test": [1]})
        state_gui_model.q_1d_rebin_string = "test"
        state_gui_model.q_xy_max = 1.
        state_gui_model.q_xy_step = 122.
        state_gui_model.q_xy_step_type = RangeStepType.Log

        self.assertTrue(state_gui_model.q_1d_rebin_string == "test")
        self.assertTrue(state_gui_model.q_xy_max == 1.)
        self.assertTrue(state_gui_model.q_xy_step == 122.)
        self.assertTrue(state_gui_model.q_xy_step_type is RangeStepType.Log)
开发者ID:DanNixon,项目名称:mantid,代码行数:11,代码来源:state_gui_model_test.py


示例11: test_that_can_set_and_reset_merged_settings

    def test_that_can_set_and_reset_merged_settings(self):
        state_gui_model = StateGuiModel({DetectorId.shift_fit: [det_fit_range(start=1., stop=2., use_fit=True)],
                                         DetectorId.rescale_fit: [det_fit_range(start=1.4, stop=7., use_fit=False)],
                                         DetectorId.rescale: [12.],
                                         DetectorId.shift: [234.]})
        self.assertTrue(state_gui_model.merge_scale == 12.)
        self.assertTrue(state_gui_model.merge_shift == 234.)
        self.assertFalse(state_gui_model.merge_scale_fit)
        self.assertTrue(state_gui_model.merge_shift_fit)
        self.assertTrue(state_gui_model.merge_q_range_start == 1.)
        self.assertTrue(state_gui_model.merge_q_range_stop == 7.)

        state_gui_model.merge_scale = 12.3
        state_gui_model.merge_shift = 3.
        state_gui_model.merge_scale_fit = True
        state_gui_model.merge_shift_fit = False
        state_gui_model.merge_q_range_start = 2.
        state_gui_model.merge_q_range_stop = 8.

        self.assertTrue(state_gui_model.merge_scale == 12.3)
        self.assertTrue(state_gui_model.merge_shift == 3.)
        self.assertTrue(state_gui_model.merge_scale_fit)
        self.assertFalse(state_gui_model.merge_shift_fit)
        self.assertTrue(state_gui_model.merge_q_range_start == 2.)
        self.assertTrue(state_gui_model.merge_q_range_stop == 8.)
开发者ID:DanNixon,项目名称:mantid,代码行数:25,代码来源:state_gui_model_test.py


示例12: test_that_can_set_the_sample_geometry

 def test_that_can_set_the_sample_geometry(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.sample_width = 1.2
     state_gui_model.sample_height = 1.6
     state_gui_model.sample_thickness = 1.8
     state_gui_model.z_offset = 1.78
     state_gui_model.sample_shape = SampleShape.Cuboid
     self.assertTrue(state_gui_model.sample_width == 1.2)
     self.assertTrue(state_gui_model.sample_height == 1.6)
     self.assertTrue(state_gui_model.sample_thickness == 1.8)
     self.assertTrue(state_gui_model.z_offset == 1.78)
     self.assertTrue(state_gui_model.sample_shape is SampleShape.Cuboid)
开发者ID:DanNixon,项目名称:mantid,代码行数:12,代码来源:state_gui_model_test.py


示例13: red_dim_wrapper

 def red_dim_wrapper():
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.reduction_dimensionality = "string"
开发者ID:DanNixon,项目名称:mantid,代码行数:3,代码来源:state_gui_model_test.py


示例14: test_that_slice_event_can_be_updated

 def test_that_slice_event_can_be_updated(self):
     state_gui_model = StateGuiModel({OtherId.event_slices: [event_binning_string_values(value="test")]})
     state_gui_model.event_slices = "test2"
     self.assertTrue(state_gui_model.event_slices == "test2")
开发者ID:DanNixon,项目名称:mantid,代码行数:4,代码来源:state_gui_model_test.py


示例15: test_that_is_set_to_2D_reduction

 def test_that_is_set_to_2D_reduction(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.reduction_dimensionality = ReductionDimensionality.TwoDim
     self.assertTrue(state_gui_model.reduction_dimensionality is ReductionDimensionality.TwoDim)
开发者ID:DanNixon,项目名称:mantid,代码行数:4,代码来源:state_gui_model_test.py


示例16: test_that_radius_mask_can_be_set

 def test_that_radius_mask_can_be_set(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.radius_limit_min = 12.
     state_gui_model.radius_limit_max = 13.
     self.assertTrue(state_gui_model.radius_limit_min == 12.)
     self.assertTrue(state_gui_model.radius_limit_max == 13.)
开发者ID:DanNixon,项目名称:mantid,代码行数:6,代码来源:state_gui_model_test.py


示例17: test_that_mask_file_can_be_set

 def test_that_mask_file_can_be_set(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.mask_files = ["file.txt", "file2.txt"]
     self.assertTrue(state_gui_model.mask_files == ["file.txt", "file2.txt"])
开发者ID:DanNixon,项目名称:mantid,代码行数:4,代码来源:state_gui_model_test.py


示例18: test_that_can_zero_error_free_saving_can_be_changed

 def test_that_can_zero_error_free_saving_can_be_changed(self):
     state_gui_model = StateGuiModel({OtherId.save_as_zero_error_free: [True]})
     state_gui_model.zero_error_free = False
     self.assertFalse(state_gui_model.zero_error_free)
开发者ID:DanNixon,项目名称:mantid,代码行数:4,代码来源:state_gui_model_test.py


示例19: test_that_can_set_compatibility_mode

 def test_that_can_set_compatibility_mode(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.compatibility_mode = True
     self.assertTrue(state_gui_model.compatibility_mode)
开发者ID:DanNixon,项目名称:mantid,代码行数:4,代码来源:state_gui_model_test.py


示例20: test_that_can_select_multiple_save_types

 def test_that_can_select_multiple_save_types(self):
     state_gui_model = StateGuiModel({"test": [1]})
     state_gui_model.save_types = [SaveType.RKH, SaveType.NXcanSAS]
     self.assertTrue(state_gui_model.save_types == [SaveType.RKH, SaveType.NXcanSAS])
开发者ID:DanNixon,项目名称:mantid,代码行数:4,代码来源:state_gui_model_test.py



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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