本文整理匯總了Python中diffpy.srreal.pdfcalculator.PDFCalculator.peakwidthmodel方法的典型用法代碼示例。如果您正苦於以下問題:Python PDFCalculator.peakwidthmodel方法的具體用法?Python PDFCalculator.peakwidthmodel怎麽用?Python PDFCalculator.peakwidthmodel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類diffpy.srreal.pdfcalculator.PDFCalculator
的用法示例。
在下文中一共展示了PDFCalculator.peakwidthmodel方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_ticker_override
# 需要導入模塊: from diffpy.srreal.pdfcalculator import PDFCalculator [as 別名]
# 或者: from diffpy.srreal.pdfcalculator.PDFCalculator import peakwidthmodel [as 別名]
def test_ticker_override(self):
"""check PeakWidthModel.ticker override in a Python-derived class.
"""
pwm = MyPWM()
self.assertEqual(0, pwm.tcnt)
et0 = pwm.ticker()
self.assertEqual(1, pwm.tcnt)
et1 = PeakWidthModel.ticker(pwm)
self.assertEqual(1, pwm.tcnt)
self.assertEqual(et0, et1)
et0.click()
self.assertEqual(et0, et1)
# check that implicit ticker call from PDFCalculator is
# handled by the Python ticker override.
pc = PDFCalculator()
pc.peakwidthmodel = pwm
pc.ticker()
self.assertEqual(2, pwm.tcnt)
return