本文整理汇总了Python中pyFAI.azimuthalIntegrator.AzimuthalIntegrator.rArray方法的典型用法代码示例。如果您正苦于以下问题:Python AzimuthalIntegrator.rArray方法的具体用法?Python AzimuthalIntegrator.rArray怎么用?Python AzimuthalIntegrator.rArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyFAI.azimuthalIntegrator.AzimuthalIntegrator
的用法示例。
在下文中一共展示了AzimuthalIntegrator.rArray方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: image_test_rings
# 需要导入模块: from pyFAI.azimuthalIntegrator import AzimuthalIntegrator [as 别名]
# 或者: from pyFAI.azimuthalIntegrator.AzimuthalIntegrator import rArray [as 别名]
def image_test_rings():
rings = 10
mod = 50
detector = detector_factory("Titan")
sigma = detector.pixel1 * 4
shape = detector.max_shape
ai = AzimuthalIntegrator(detector=detector)
ai.setFit2D(1000, 1000, 1000)
r = ai.rArray(shape)
r_max = r.max()
chi = ai.chiArray(shape)
img = numpy.zeros(shape)
modulation = (1 + numpy.sin(5 * r + chi * mod))
for radius in numpy.linspace(0, r_max, rings):
img += numpy.exp(-(r - radius) ** 2 / (2 * (sigma * sigma)))
return img * modulation
示例2: image_test_rings
# 需要导入模块: from pyFAI.azimuthalIntegrator import AzimuthalIntegrator [as 别名]
# 或者: from pyFAI.azimuthalIntegrator.AzimuthalIntegrator import rArray [as 别名]
def image_test_rings():
"Creating a test image containing gaussian spots on several rings"
rings = 10
mod = 50
detector = detector_factory("Titan")
sigma = detector.pixel1 * 4
shape = detector.max_shape
ai = AzimuthalIntegrator(detector=detector)
ai.setFit2D(1000, 1000, 1000)
r = ai.rArray(shape)
r_max = r.max()
chi = ai.chiArray(shape)
img = numpy.zeros(shape)
modulation = (1 + numpy.sin(5 * r + chi * mod))
for radius in numpy.linspace(0, r_max, rings):
img += numpy.exp(-(r - radius) ** 2 / (2 * (sigma * sigma)))
img *= modulation
img = add_noise(img, 0.0)
return img