本文整理匯總了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
示例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
示例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()
示例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
示例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