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


Python Group.sszr方法代码示例

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


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

示例1: do_fit

# 需要导入模块: from larch import Group [as 别名]
# 或者: from larch.Group import sszr [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, 'BaZrO3.chik'), _larch=self._larch)

    gds = Group(amp    = Parameter(0.95,    vary=True,  _larch=self._larch),
                enot   = Parameter(1e-7,    vary=True,  _larch=self._larch),
                sso    = Parameter(0.003,   vary=True,  _larch=self._larch),
                czr    = Parameter(0.,      vary=False, _larch=self._larch), _larch=self._larch  )

    if firstshell:
        gds.delr   = Parameter(1e-7,    vary=True,  _larch=self._larch)
        dr1param   = 'delr'
    else:
        gds.alpha  = Parameter(0.00001, vary=True,  _larch=self._larch)
        gds.ssba   = Parameter(0.003,   vary=True,  _larch=self._larch)
        gds.sszr   = Parameter(0.003,   vary=True,  _larch=self._larch)
        gds.eba    = Parameter(1e-7,    vary=True,  _larch=self._larch)
        gds.ezr    = Parameter(1e-7,    vary=True,  _larch=self._larch)
        #gds.eba    = Parameter(expr='enot',          _larch=self._larch)
        #gdsezr    = Parameter(expr='enot',         _larch=self._larch)
        gds.sso2   = Parameter(0.003,   vary=True,  _larch=self._larch)
        dr1param   = 'alpha*reff'

    paths = list()
    paths.append(feffpath(realpath(join(folder, "feff0001.dat")),
                          s02    = 'amp',
                          deltar = dr1param,
                          e0     = 'enot',
                          sigma2 = 'sso',
                          _larch=self._larch))
    if not firstshell:
        paths.append(feffpath(realpath(join(folder, "feff0002.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'enot',
                              sigma2 = 'sso*1.5',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0003.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'eba',
                              sigma2 = 'ssba',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0004.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'ezr',
                              sigma2 = 'sszr',
                              third  = 'czr',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0005.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'enot',
                              sigma2 = 'sso*2',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0006.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = '(enot+ezr)/2',
                              sigma2 = 'sszr',
                              third  = 'czr',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0007.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'enot',
                              sigma2 = 'sso*2',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0009.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = '(2*enot+ezr)/3',
                              sigma2 = 'sszr',
                              third  = 'czr',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0008.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'enot',
                              sigma2 = 'sso*4',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0011.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = '(enot+eba)/2',
                              sigma2 = 'ssba+sso',
                              _larch=self._larch))
        paths.append(feffpath(realpath(join(folder, "feff0012.dat")),
                              s02    = 'amp',
                              deltar = 'alpha*reff',
                              e0     = 'enot',
#.........这里部分代码省略.........
开发者ID:bruceravel,项目名称:SCFtests,代码行数:103,代码来源:BaZrO3.py


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