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


Python AzimuthalIntegrator.xrpd_halfSplitPixel方法代码示例

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


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

示例1: AzimuthalIntegrator

# 需要导入模块: from pyFAI.azimuthalIntegrator import AzimuthalIntegrator [as 别名]
# 或者: from pyFAI.azimuthalIntegrator.AzimuthalIntegrator import xrpd_halfSplitPixel [as 别名]
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:
        print ("Usage:")
        print (" $ python integrate.py -p=param.poni file.edf file2.edf file3.edf")
开发者ID:kif,项目名称:pyFAI_debian,代码行数:32,代码来源:integrate_exp.py


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