本文整理汇总了Python中sans.gui_logic.models.state_gui_model.StateGuiModel.q_resolution_sample_w方法的典型用法代码示例。如果您正苦于以下问题:Python StateGuiModel.q_resolution_sample_w方法的具体用法?Python StateGuiModel.q_resolution_sample_w怎么用?Python StateGuiModel.q_resolution_sample_w使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sans.gui_logic.models.state_gui_model.StateGuiModel
的用法示例。
在下文中一共展示了StateGuiModel.q_resolution_sample_w方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_that_q_resolution_can_be_set_correctly
# 需要导入模块: from sans.gui_logic.models.state_gui_model import StateGuiModel [as 别名]
# 或者: from sans.gui_logic.models.state_gui_model.StateGuiModel import q_resolution_sample_w [as 别名]
def test_that_q_resolution_can_be_set_correctly(self):
state_gui_model = StateGuiModel({"test": [1]})
state_gui_model.use_q_resolution = True
state_gui_model.q_resolution_source_a = 1.5
state_gui_model.q_resolution_sample_a = 2.5
state_gui_model.q_resolution_source_h = 1.5
state_gui_model.q_resolution_sample_h = 2.5
state_gui_model.q_resolution_source_w = 1.5
state_gui_model.q_resolution_sample_w = 2.5
state_gui_model.q_resolution_collimation_length = 1.7
state_gui_model.q_resolution_delta_r = 12.4
state_gui_model.q_resolution_moderator_file = "test.txt"
self.assertTrue(state_gui_model.use_q_resolution)
self.assertTrue(state_gui_model.q_resolution_source_a == 1.5)
self.assertTrue(state_gui_model.q_resolution_sample_a == 2.5)
self.assertTrue(state_gui_model.q_resolution_source_h == 1.5)
self.assertTrue(state_gui_model.q_resolution_sample_h == 2.5)
self.assertTrue(state_gui_model.q_resolution_source_w == 1.5)
self.assertTrue(state_gui_model.q_resolution_sample_w == 2.5)
self.assertTrue(state_gui_model.q_resolution_collimation_length == 1.7)
self.assertTrue(state_gui_model.q_resolution_delta_r == 12.4)
self.assertTrue(state_gui_model.q_resolution_moderator_file == "test.txt")