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


Python state_gui_model.StateGuiModel类代码示例

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


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


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