當前位置: 首頁>>代碼示例>>Python>>正文


Python Spectrum.create_model方法代碼示例

本文整理匯總了Python中hyperspy._signals.spectrum.Spectrum.create_model方法的典型用法代碼示例。如果您正苦於以下問題:Python Spectrum.create_model方法的具體用法?Python Spectrum.create_model怎麽用?Python Spectrum.create_model使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在hyperspy._signals.spectrum.Spectrum的用法示例。


在下文中一共展示了Spectrum.create_model方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setUp

# 需要導入模塊: from hyperspy._signals.spectrum import Spectrum [as 別名]
# 或者: from hyperspy._signals.spectrum.Spectrum import create_model [as 別名]
 def setUp(self):
     s = Spectrum(range(100))
     m = s.create_model()
     m.append(Gaussian())
     m.components.Gaussian.A.value = 13
     m.components.Gaussian.name = 'something'
     self.m = m
開發者ID:temcode,項目名稱:hyperspy,代碼行數:9,代碼來源:test_model_storing.py

示例2: setUp

# 需要導入模塊: from hyperspy._signals.spectrum import Spectrum [as 別名]
# 或者: from hyperspy._signals.spectrum.Spectrum import create_model [as 別名]
 def setUp(self):
     s = Spectrum(np.array([1.0, 2, 4, 7, 12, 7, 4, 2, 1]))
     m = s.create_model()
     self.model = m
     self.A = 38.022476979172588
     self.sigma = 1.4764966133859543
     self.centre = 4.0000000002462945
開發者ID:lu-chi,項目名稱:hyperspy,代碼行數:9,代碼來源:test_chi_squared.py

示例3: setUp

# 需要導入模塊: from hyperspy._signals.spectrum import Spectrum [as 別名]
# 或者: from hyperspy._signals.spectrum.Spectrum import create_model [as 別名]
    def setUp(self):
        s = Spectrum(np.array([1.0, 2, 4, 7, 12, 7, 4, 2, 1]))
        m = s.create_model()
        m.low_loss = (s + 3.0).deepcopy()
        self.model = m
        self.s = s

        m.append(Gaussian())
        m.append(Gaussian())
        m.append(ScalableFixedPattern(s * 0.3))
        m[0].A.twin = m[1].A
        m.fit()
開發者ID:AakashV,項目名稱:hyperspy,代碼行數:14,代碼來源:test_model_as_dictionary.py

示例4: setUp

# 需要導入模塊: from hyperspy._signals.spectrum import Spectrum [as 別名]
# 或者: from hyperspy._signals.spectrum.Spectrum import create_model [as 別名]
 def setUp(self):
     g = Gaussian()
     g.A.value = 10000.0
     g.centre.value = 5000.0
     g.sigma.value = 500.0
     axis = np.arange(10000)
     s = Spectrum(g.function(axis))
     m = s.create_model()
     self.model = m
     self.g = g
     self.axis = axis
     self.rtol = 0.00
開發者ID:jerevon,項目名稱:hyperspy,代碼行數:14,代碼來源:test_fit_component.py

示例5: setUp

# 需要導入模塊: from hyperspy._signals.spectrum import Spectrum [as 別名]
# 或者: from hyperspy._signals.spectrum.Spectrum import create_model [as 別名]
 def setUp(self):
     g1 = Gaussian()
     g2 = Gaussian()
     g3 = Gaussian()
     s = Spectrum(np.arange(1000).reshape(10, 10, 10))
     m = s.create_model()
     m.append(g1)
     m.append(g2)
     m.append(g3)
     self.g1 = g1
     self.g2 = g2
     self.g3 = g3
     self.model = m
開發者ID:AakashV,項目名稱:hyperspy,代碼行數:15,代碼來源:test_set_parameter_value.py


注:本文中的hyperspy._signals.spectrum.Spectrum.create_model方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。