本文整理匯總了Python中ramanTools.RamanSpectrum.normalize方法的典型用法代碼示例。如果您正苦於以下問題:Python RamanSpectrum.normalize方法的具體用法?Python RamanSpectrum.normalize怎麽用?Python RamanSpectrum.normalize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ramanTools.RamanSpectrum
的用法示例。
在下文中一共展示了RamanSpectrum.normalize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: May7
# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import normalize [as 別名]
def May7():
figure()
a = RamanSpectrum('/home/chris/Documents/DataWeiss/150507/150507_01.txt')
a.normalize()
a.plot()
ics('/home/chris/Orca/CdTP_bridge/CdTP_bridgeDFT.out',normalize = True)
title('thiophenol')
figure()
a = RamanSpectrum('/home/chris/Documents/DataWeiss/150507/150507_03.txt')
a.normalize()
a.plot()
i = RamanSpectrum('/home/chris/Documents/DataWeiss/150508/150508_02.txt')
i[:]/=1200
i.smooth()
i.autobaseline((70,450),leaveout=(70,340),order = 4)
i.autobaseline((450,1650),order = 2, join='start')
i.plot()
ics('/home/chris/Orca/CdClTP/CdClTP.out',normalize = True,labelpeaks = False)
figure()
a = RamanSpectrum('/home/chris/Documents/DataWeiss/150507/150507_06.txt') ## bromocomplex
a.autobaseline((70,450),leaveout=(70,340),order = 4)
a.autobaseline((450,1650),order = 2, join='start')
a.normalize()
a.plot()
i = RamanSpectrum('/home/chris/Documents/DataWeiss/150508/150508_08.txt') ## bromo on dots
i[:]/=1200
i.smooth()
i.autobaseline((70,450),leaveout=(70,340),order = 4)
i.autobaseline((450,1650),order = 2, join='start')
i.plot()
ics('/home/chris/Orca/CdBrTP/CdBrTP.out',normalize = True,labelpeaks = False)
return 0
示例2: thiophenolreffits
# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import normalize [as 別名]
def thiophenolreffits():
e = RamanSpectrum('/home/chris/Documents/DataWeiss/150430/150430_08.txt')
d = RamanSpectrum('/home/chris/Documents/DataWeiss/150430/150430_14.txt')
a = RamanSpectrum('/home/chris/Documents/DataWeiss/150424/150424_06.txt')
c = RamanSpectrum('/home/chris/Documents/DataWeiss/141014/4_methoxythiophenol.spe')
b = RamanSpectrum('/home/chris/Documents/DataWeiss/141007/1_methylbenzenethiol.spe')
a.normalize()
b.normalize()
c.normalize()
d.normalize()
e.normalize()
ax1 = gca()
a[:]+=0
b[:]+=1.1
c[:]+=2.2
d[:]+=3.3
e[:]+=4.4
a.plot(marker = 'o',markersize = 1)
b.plot(marker = 'o',markersize = 1)
c.plot(marker = 'o',markersize = 1)
d.plot(marker = 'o',markersize = 1)
e.plot(marker = 'o',markersize = 1)
ylim(0,6)
xlim(68,1980)
a_list = list()
b_list = list()
c_list = list()
d_list = list()
e_list = list()
for w in (541,628,734,1180,1300):
print w
z = fitspectrum(a,(w-30,w+30),'OneGaussian', [0.5, w,50, 0,50])
if z ==-1:
print 'fit awry'
else:
a_list.append(z[0])
plot(z[1], z[2])
z = fitspectrum(a,(1540,1600),'TwoGaussian', [1,1, 1561,1574,10,10,0,0])
if z ==-1:
print 'fit awry'
else:
a_list.append(z[0])
plot(z[1], z[2])
z = fitspectrum(a,(1020,1120),'FourGaussian', [1,1,1,1,1060,1074, 1090, 1100,20,20,20,20,0,0])
if z ==-1:
print 'fit awry'
else:
a_list.append(z[0])
plot(z[1], z[2])
###############################################################
for w in (647,803,1104,1191,1220,1598):
print w
z = fitspectrum(b,(w-30,w+30),'OneGaussian', [0.5, w,50, 0,1.1])
if z ==-1:
print 'fit awry'
else:
b_list.append(z[0])
plot(z[1], z[2])
###############################################################
for w in (206,499,623,636,795,1088,1178,1280,1591):
print w
print type(c)
z= fitspectrum(c,(w-30,w+30),'OneGaussian', [1, w,50, 0,2.2])
if z ==-1:
print 'fit awry'
else:
c_list.append(z[0])
plot(z[1], z[2])
###############################################################
for w in (262,496,538,628,724,1066,1087,1177,1561):
print w
z= fitspectrum(d,(w-30,w+30),'OneGaussian', [1, w,50, 0,3.3])
if z ==-1:
print 'fit awry'
else:
d_list.append(z[0])
plot(z[1], z[2])
###############################################################
for w in (242,631,813,1083,1157,1588):
print w
z= fitspectrum(e,(w-30,w+30),'OneGaussian', [1, w,50, 0,4.4])
if z ==-1:
print 'fit awry'
#.........這裏部分代碼省略.........