本文整理汇总了Python中larch.Group.mu方法的典型用法代码示例。如果您正苦于以下问题:Python Group.mu方法的具体用法?Python Group.mu怎么用?Python Group.mu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类larch.Group
的用法示例。
在下文中一共展示了Group.mu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Interpreter
# 需要导入模块: from larch import Group [as 别名]
# 或者: from larch.Group import mu [as 别名]
# now import larch-specific Python code
from larch_plugins.xafs import autobk, xftf
# create a larch interpreter, passed to most functions
my_larch = Interpreter(with_plugins=False)
# create an empty Group
xafsdat = Group()
# read data (here using np.loadtxt), stick into Group
# using "expected names" for XAFS data
rawdata = np.loadtxt('../xafsdata/fe2o3_rt1.xmu')
xafsdat.energy = rawdata[:, 0]
xafsdat.mu = rawdata[:, 1]
xafsdat.i0 = rawdata[:, 1]
# run autobk on the xafsdat Group, including a larch Interpreter....
# note that this expects 'energy' and 'mu' to be in xafsdat, and will
# write data for 'k', 'chi', 'kwin', 'e0', ... into xafsdat
autobk(xafsdat, rbkg=1.0, kweight=2, _larch=my_larch)
# Fourier transform to R space, again passing in a Group (here,
# 'k' and 'chi' are expected, and writitng out 'r', 'chir_mag',
# and so on
xftf(xafsdat, kmin=2, kmax=15, dk=3, kweight=2, _larch=my_larch)
#
# plot grid of results:
# mu + bkg