本文整理汇总了Python中larch.Group.ssni方法的典型用法代码示例。如果您正苦于以下问题:Python Group.ssni方法的具体用法?Python Group.ssni怎么用?Python Group.ssni使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类larch.Group
的用法示例。
在下文中一共展示了Group.ssni方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_fit
# 需要导入模块: from larch import Group [as 别名]
# 或者: from larch.Group import ssni [as 别名]
def do_fit(self, which, firstshell=False, fittest='baseline'):
if which == 'testrun':
folder = self.testrun
elif which == 'baseline':
folder = self.baseline
else:
folder = realpath(join(self.folder, fittest, which))
#endif
data = read_xdi(join(self.path, 'NiO.chik'), _larch=self._larch)
if hasattr(data, 'wavenumber'):
data.k = data.wavenumber
gds = Group(amp = Parameter(1, vary=True, _larch=self._larch),
enot = Parameter(1e-7, vary=True, _larch=self._larch),
sso = Parameter(0.003, vary=True, _larch=self._larch), _larch=self._larch )
if firstshell:
gds.delr = Parameter(1e-7, vary=True, _larch=self._larch)
dr1param = 'delr'
else:
gds.alpha = Parameter(1e-7, vary=True, _larch=self._larch)
gds.ssni = Parameter(0.003, vary=True, _larch=self._larch)
gds.sso2 = Parameter(0.003, vary=True, _larch=self._larch)
#gds.sso3 = Parameter(0.003, vary=True, _larch=self._larch)
gds.ssni2 = Parameter(0.003, vary=True, _larch=self._larch)
#gds.ssni3 = Parameter(0.003, vary=True, _larch=self._larch)
#gds.ssni4 = Parameter(0.003, vary=True, _larch=self._larch)
dr1param = 'alpha*reff'
paths = list()
paths.append(feffpath(realpath(join(folder, "feff0001.dat")), # 1st shell O SS
s02 = 'amp',
e0 = 'enot',
sigma2 = 'sso',
deltar = dr1param, _larch=self._larch))
if not firstshell:
paths.append(feffpath(realpath(join(folder, "feff0002.dat")), # 2nd shell Ni SS
s02 = 'amp',
e0 = 'enot',
sigma2 = 'ssni',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0003.dat")), # O-O triangle
s02 = 'amp',
e0 = 'enot',
sigma2 = '1.5*sso',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0004.dat")), # O-Ni triangle
s02 = 'amp',
e0 = 'enot',
sigma2 = 'sso+ssni/2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0005.dat")), # 3rd shell O SS
s02 = 'amp',
e0 = 'enot',
sigma2 = 'sso2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0006.dat")), # 4th shell Ni SS
s02 = 'amp',
e0 = 'enot',
sigma2 = 'ssni2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0007.dat")), # O-O non-forward linear
s02 = 'amp',
e0 = 'enot',
sigma2 = 'sso*2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0008.dat")), # O-Ni forward scattering
s02 = 'amp',
e0 = 'enot',
sigma2 = 'ssni2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0009.dat")), # O-O forward through absorber
s02 = 'amp',
e0 = 'enot',
sigma2 = 'sso*2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0011.dat")), # O-Ni-O double forward
s02 = 'amp',
e0 = 'enot',
sigma2 = 'ssni2',
deltar = 'alpha*reff', _larch=self._larch))
paths.append(feffpath(realpath(join(folder, "feff0010.dat")), # O-O rattle (the order of 10 and 11 is different in Demeter's pathfinder!)
s02 = 'amp',
e0 = 'enot',
sigma2 = 'sso*4',
deltar = 'alpha*reff', _larch=self._larch))
rx = 4.2
if firstshell: rx = 1.95
trans = feffit_transform(kmin=3, kmax=15.938, kw=(2,1,3), dk=1, window='hanning', rmin=1.0, rmax=rx, _larch=self._larch)
dset = feffit_dataset(data=data, pathlist=paths, transform=trans, _larch=self._larch)
fit = feffit(gds, dset, _larch=self._larch)
if self.doplot:
offset = 0.6*max(dset.data.chir_mag)
_newplot(dset.data.r, dset.data.chir_mag+offset, xmax=8,
xlabel=r'$R \rm\,(\AA)$', label='data',
#.........这里部分代码省略.........