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


Python SANSUtility.correct_q_resolution_for_can方法代码示例

本文整理汇总了Python中SANSUtility.correct_q_resolution_for_can方法的典型用法代码示例。如果您正苦于以下问题:Python SANSUtility.correct_q_resolution_for_can方法的具体用法?Python SANSUtility.correct_q_resolution_for_can怎么用?Python SANSUtility.correct_q_resolution_for_can使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SANSUtility的用法示例。


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

示例1: test_error_is_ignored_for_more_than_one_spectrum

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import correct_q_resolution_for_can [as 别名]
 def test_error_is_ignored_for_more_than_one_spectrum(self):
     # Arrange
     orig_name = "orig"
     can_name = "can"
     result_name = "result"
     provide_workspace_with_x_errors(orig_name, True, 2)
     provide_workspace_with_x_errors(can_name, True, 2)
     provide_workspace_with_x_errors(result_name, False, 2)
     orig = mtd[orig_name]
     can = mtd[can_name]
     result = mtd[result_name]
     # Act
     su.correct_q_resolution_for_can(orig, can, result)
     # Assert
     self.assertFalse(result.hasDx(0))
     # Clean up
     DeleteWorkspace(orig)
     DeleteWorkspace(can)
     DeleteWorkspace(result)
开发者ID:spaceyatom,项目名称:mantid,代码行数:21,代码来源:SANSUtilityTest.py

示例2: test_error_is_not_passed_on_when_did_not_exist_beforehand

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import correct_q_resolution_for_can [as 别名]
 def test_error_is_not_passed_on_when_did_not_exist_beforehand(self):
     # Arrange
     orig_name = "orig"
     can_name = "can"
     result_name = "result"
     provide_workspace_with_x_errors(orig_name, False, 1)
     provide_workspace_with_x_errors(can_name, False, 1)
     provide_workspace_with_x_errors(result_name, False, 1)
     orig = mtd[orig_name]
     can = mtd[can_name]
     result = mtd[result_name]
     # Act
     su.correct_q_resolution_for_can(orig, can, result)
     # Assert
     self.assertFalse(result.hasDx(0))
     # Clean up
     DeleteWorkspace(orig)
     DeleteWorkspace(can)
     DeleteWorkspace(result)
开发者ID:spaceyatom,项目名称:mantid,代码行数:21,代码来源:SANSUtilityTest.py

示例3: test_error_is_passed_from_original_to_subtracted_workspace

# 需要导入模块: import SANSUtility [as 别名]
# 或者: from SANSUtility import correct_q_resolution_for_can [as 别名]
 def test_error_is_passed_from_original_to_subtracted_workspace(self):
     # Arrange
     orig_name = "orig"
     can_name = "can"
     result_name = "result"
     provide_workspace_with_x_errors(orig_name, True)
     provide_workspace_with_x_errors(can_name, True)
     provide_workspace_with_x_errors(result_name, False)
     orig = mtd[orig_name]
     can = mtd[can_name]
     result = mtd[result_name]
     # Act
     su.correct_q_resolution_for_can(orig, can, result)
     # Assert
     dx_orig = orig.dataDx(0)
     dx_result = result.dataDx(0)
     self.assertTrue(result.hasDx(0))
     for index in range(0, len(dx_orig)):
         self.assertEqual(dx_orig[index], dx_result[index])
     # Clean up
     DeleteWorkspace(orig)
     DeleteWorkspace(can)
     DeleteWorkspace(result)
开发者ID:spaceyatom,项目名称:mantid,代码行数:25,代码来源:SANSUtilityTest.py


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