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


Python ArithmeticModel.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
 def __init__(self, name='linebroad'):
     self.ampl = Parameter(name, 'ampl', 1, 0, hard_min=0)
     self.rest = Parameter(name, 'rest', 1000, tinyval, hard_min=tinyval)
     self.vsini = Parameter(name, 'vsini', tinyval, tinyval,
                            hard_min=tinyval)
     ArithmeticModel.__init__(self, name,
                              (self.ampl, self.rest, self.vsini))
开发者ID:cxcdev,项目名称:sherpa,代码行数:9,代码来源:__init__.py

示例2: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
    def __init__(self, name='brokenpowerlaw'):
        self.refer = Parameter(name, 'refer', 5000., tinyval, hard_min=tinyval, frozen=True, units="angstroms")
        self.ampl = Parameter(name, 'ampl', 1., tinyval, hard_min=tinyval, units="angstroms")
        self.index1 = Parameter(name, 'index1', 0.1, -10.0, 10.0)
        self.index2 = Parameter(name, 'index2', -0.1, -10.0, 10.0)

        ArithmeticModel.__init__(self, name, (self.refer, self.ampl, self.index1, self.index2))
开发者ID:OrbitalMechanic,项目名称:sherpa,代码行数:9,代码来源:__init__.py

示例3: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
 def __init__(self, name='IC'):
     self.TFIR = Parameter(name, 'TFIR', 30, min=0, frozen=True, units='K')
     self.uFIR = Parameter(name,
                           'uFIR',
                           0.0,
                           min=0,
                           frozen=True,
                           units='eV/cm3'
                          )  # , 0.2eV/cm3 typical in outer disk
     self.TNIR = Parameter(name, 'TNIR', 3000, min=0, frozen=True, units='K')
     self.uNIR = Parameter(name,
                           'uNIR',
                           0.0,
                           min=0,
                           frozen=True,
                           units='eV/cm3'
                          )  # , 0.2eV/cm3 typical in outer disk
     # add ECPL params
     super(InverseCompton, self).__init__(name=name)
     # Initialize model
     ArithmeticModel.__init__(self, name,
                              (self.index, self.ref, self.ampl, self.cutoff,
                               self.beta, self.TFIR, self.uFIR, self.TNIR,
                               self.uNIR, self.distance, self.verbose))
     self._use_caching = True
     self.cache = 10
开发者ID:astrofrog,项目名称:naima,代码行数:28,代码来源:sherpa_models.py

示例4: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
 def __init__(self, name='shell2d'):
     self.xpos = Parameter(name, 'xpos', 0) # p[0]
     self.ypos = Parameter(name, 'ypos', 0) # p[1]
     self.ampl = Parameter(name, 'ampl', 1) # p[2]
     self.r0 = Parameter(name, 'r0', 1, 0) # p[3]
     self.width = Parameter(name, 'width', 0.1, 0)
     ArithmeticModel.__init__(self, name, (self.xpos, self.ypos, self.ampl, self.r0, self.width))
开发者ID:mirca,项目名称:sherpa,代码行数:9,代码来源:__init__.py

示例5: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
 def __init__(self, name="Bremsstrahlung"):
     self.name = name
     self.n0 = Parameter(
         name, "n0", 1, min=0, max=1e20, frozen=True, units="1/cm3"
     )
     self.weight_ee = Parameter(
         name, "weight_ee", 1.088, min=0, max=10, frozen=True
     )
     self.weight_ep = Parameter(
         name, "weight_ep", 1.263, min=0, max=10, frozen=True
     )
     # add ECPL params
     super(Bremsstrahlung, self).__init__(name=name)
     # Initialize model
     ArithmeticModel.__init__(
         self,
         name,
         (
             self.index,
             self.ref,
             self.ampl,
             self.cutoff,
             self.beta,
             self.n0,
             self.weight_ee,
             self.weight_ep,
             self.distance,
             self.verbose,
         ),
     )
     self._use_caching = True
     self.cache = 10
开发者ID:zblz,项目名称:naima,代码行数:34,代码来源:sherpa_models.py

示例6: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
 def __init__(self,name='pp'):
     self.index   = Parameter(name , 'index'   , 2.1 , min=-10 , max=10)
     self.ref     = Parameter(name , 'ref'     , 60  , min=0   , frozen=True  , units='TeV')
     self.ampl    = Parameter(name , 'ampl'    , 100 , min=0   , max=1e60     , hard_max=1e100 , units='1e30/eV')
     self.cutoff  = Parameter(name , 'cutoff'  , 0   , min=0   , frozen=True  , units='TeV')
     self.beta    = Parameter(name , 'beta'    , 1   , min=0   , max=10       , frozen=True)
     self.nh      = Parameter(name , 'nH'      , 1   , min=0   , frozen=True  , units='1/cm3')
     self.verbose = Parameter(name , 'verbose' , 0   , min=0   , frozen=True)
     ArithmeticModel.__init__(self,name,(self.index,self.ref,self.ampl,self.cutoff,self.beta,self.nh,self.verbose))
     self._use_caching = True
     self.cache = 10
开发者ID:mahmoud-lsw,项目名称:gammafit,代码行数:13,代码来源:sherpamod.py

示例7: __init__

# 需要导入模块: from sherpa.models.model import ArithmeticModel [as 别名]
# 或者: from sherpa.models.model.ArithmeticModel import __init__ [as 别名]
    def __init__(self, name='parametercase'):
        self.period = Parameter(name, 'Period', 1, 1e-10, 10, tinyval)
        self.offset = Parameter(name, 'Offset', 0, 0, hard_min=0)
        self.ampl = Parameter(name, 'Ampl', 1, 1e-05, hard_min=0, aliases=["NORM"])

        with warnings.catch_warnings(record=True) as warn:
            warnings.simplefilter("always", DeprecationWarning)
            pars = (self.perioD, self.oFFSEt, self.NORM)
            validate_warning(warn)

        self._basemodel = Sin()
        ArithmeticModel.__init__(self, name, pars)
开发者ID:DougBurke,项目名称:sherpa,代码行数:14,代码来源:test_model.py


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