本文整理汇总了Python中pyFAI.azimuthalIntegrator.AzimuthalIntegrator.setChiDiscAtZero方法的典型用法代码示例。如果您正苦于以下问题:Python AzimuthalIntegrator.setChiDiscAtZero方法的具体用法?Python AzimuthalIntegrator.setChiDiscAtZero怎么用?Python AzimuthalIntegrator.setChiDiscAtZero使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyFAI.azimuthalIntegrator.AzimuthalIntegrator
的用法示例。
在下文中一共展示了AzimuthalIntegrator.setChiDiscAtZero方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AzimuthalIntegrator
# 需要导入模块: from pyFAI.azimuthalIntegrator import AzimuthalIntegrator [as 别名]
# 或者: from pyFAI.azimuthalIntegrator.AzimuthalIntegrator import setChiDiscAtZero [as 别名]
import pylab
# sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0]))), "plugins"))
from pyFAI.azimuthalIntegrator import AzimuthalIntegrator
if __name__ == "__main__":
paramFile = None
processFile = []
for param in sys.argv[1:]:
if param.startswith("-p="):
paramFile = param.split("=", 1)[1]
elif os.path.isfile(param):
processFile.append(param)
if paramFile and processFile:
integrator = AzimuthalIntegrator()
integrator.setChiDiscAtZero()
integrator.load(paramFile)
print integrator
for oneFile in processFile:
sys.stdout.write("Integrating %s --> " % oneFile)
outFile = os.path.splitext(oneFile)[0] + ".xy"
azimFile = os.path.splitext(oneFile)[0] + ".azim"
data = fabio.open(oneFile).data.astype("float32")
t0 = time.time()
tth, I = integrator.xrpd_halfSplitPixel(data=data, nbPt=1495, filename=outFile, correctSolidAngle=False)
t1 = time.time()
# integrator.xrpd2(data, 1000, 360, azimFile)
print "%s\t 1D took %.3fs, 2D took %.3fs" % (outFile, t1 - t0, time.time() - t1)
print "raw int: %s ; integrated: %s " % (data.sum() / data.size, I.sum())
else: