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


Python RamanSpectrum.autobaseline方法代碼示例

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


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

示例1: Mar26

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Mar26():
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150326/orangedot-nativeligand_20.txt')
    print type(a)
    a.smooth()
    
    a.autobaseline((400,520),order =0)
    a.autobaseline((520,1756),order = 4)
    a.values[:]*=10
    a.plot(label = '633 nm')
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150326/orangedot-nativeligand_21.txt')
    a = smooth(a)
    a = autobaseline(a,(2482,3600),4)
    a*=10
    a.plot(label = '633 nm')
    b = CdODPARef-2597
    b.plot(label = 'reference')
    
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150326/orangedot-nativeligand_10.txt')
    a = smooth(a)
    a-=161
    a*=25
   
    a.plot(label = '785 nm')
    
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:27,代碼來源:march24.py

示例2: May29b

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def May29b():
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150521/150521_05.txt') ## stoichiometric ODPA capped CdSe
    r = removespikes(r)
    
    r.autobaseline((119,286), order = 0)
    r.autobaseline((286,1151), order = 4, join = 'start')
    r.autobaseline((1151,1489), order = 3, join = 'start')
    r.smooth()
    
    r.plot()
    
    
    
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150408/150408_02.txt')  # Cd enriched CdSe
    r = removespikes(r)
    r.autobaseline((272,1746), order = 2)
    #r.autobaseline((1151,1489), order = 3, join = 'start')
    r.plot()
    
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150516/150516_08.txt')  
    r = removespikes(r)
    
    r.autobaseline((272,1746), order = 2)
    
    r.smooth()
    
    r.plot()
    

    
    
    
    legend(['stoic', 'rich apr8', 'rich may16'])
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:36,代碼來源:May29.py

示例3: Feb1

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Feb1():  ## 
    """Resonance Raman of CdSe dots with PPA in water.  February 1"""
    clf()
    a473 =  RamanSpectrum('/home/chris/Dropbox/DataWeiss/160201/160201_07.txt')
    a633 =  RamanSpectrum('/home/chris/Dropbox/DataWeiss/160201/160201_08.txt')
    a633=SPIDcorrect633(a633)
    a473.autobaseline((120,700),order = 3)
    a633.autobaseline((120,700),order = 3)
    a473.plot()
    a633.plot()
    legend(['473','633'])
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:14,代碼來源:Jan18.py

示例4: Fig1

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Fig1(show_vib_numbers = True): ### reference spectra of methylbenzenethiol
    figure(figsize = (6,6))
    
    MBT = copy(MeOTPRef)
    MBT-=min(MBT[0:2000])
    MBT/=max(MBT[0:2000])
    

    CdMBT = copy(CdMeOTPRef)
    CdMBT.index = array(CdMBT.index)-3
    CdMBT-=min(CdMBT[0:2000])
    CdMBT/=max(CdMBT[0:2000])
    
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150408/150408_15.txt')
    
    a.autobaseline((268,440,723,915,1200,1391,1505,1680),specialoption='points', order = 4)
    a.smooth(window_len=11,window = 'SG')
    a[:]/=3000
                  
    
    MBT.plot(color = 'b',linewidth = 2)
    CdMBT.plot(color = 'k',linewidth = 2)
    a.plot(color = 'r',linewidth = 2) 
    xlim(500,1675)
    ylim(0,1.5)
    
    ylabel('Intensity (a.u.)')
    xlabel('Raman shift (cm$^{-1}$)')
         
                    
    ####Assignments
    assignmentfontsize = 10
   # annotate('Ring bending',(635,0.2), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')
    annotate('Ring bending',(647,0.38), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')
    annotate('Ring stretching',(1105,1.05), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='horizontal')
    annotate('Ring stretching',(806,1.1), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='horizontal')
    annotate('CSH bending ',(914,0.25), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')
 #   annotate('CH bending ',(1190,0.33), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')
    #annotate('Ring stretching',(1300,0.5), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')
   # annotate('CH bending',(1382,0.1), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')
    annotate('CC ring stretching',(1607,0.5), xycoords = 'data',horizontalalignment = 'center',verticalalignment = 'bottom',color = 'k',size = assignmentfontsize,rotation ='vertical')

    legend(['MTP', 'CdMTP$_2$', 'QDs-MTP'])

    matplotlib.pyplot.tight_layout()
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:48,代碼來源:OutlineFigs.py

示例5: OPAMBTExchange

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def OPAMBTExchange():
    figure()
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150707/150707_02.txt')
    b = RamanSpectrum('/home/chris/Documents/DataWeiss/150707/150707_03.txt')
    a[:]*=5
    b[:]*=5
    subplot(121)
    a.plot()
    CdMethylTPRef.plot()
    legend(['new','old'])
    r = fitspectrum(a,(1070,1110),'OneGaussian',[25000,1088,10,0,0])
    plot(r.x,r.y, 'k',linewidth = 2)
    
    r = fitspectrum(CdMethylTPRef,(1070,1110),'OneGaussian',[25000,1088,10,0,0])
    plot(r.x,r.y,'r' ,linewidth = 2)    
    
    subplot(122)
    b.plot()
    CdMeOTPRef.plot()
    legend(['new','old'])
    
    r = fitspectrum(b,(1070,1110),'OneGaussian',[60000,1088,10,0,0])
    plot(r.x,r.y,'k',linewidth = 2)
    
    r = fitspectrum(CdMeOTPRef,(1070,1110),'OneGaussian',[6000,1088,10,0,0])
    plot(r.x,r.y,'r', linewidth = 2)    
    
    figure()
    June22()
    c= RamanSpectrum('/home/chris/Documents/DataWeiss/150707/150707_05.txt')
    
    c.autobaseline((200,2000),order= 4)
    c[:]+=4000
    c.plot()
    
    
    figure()
    d= RamanSpectrum('/home/chris/Documents/DataWeiss/150707/150707_06.txt')
    d.autobaseline((200,2000),order= 4)
    d[:]*=10
    d.plot()
    a.plot()
    legend(['exchanged', 'reference'])
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:46,代碼來源:June22_Has+the+nice+spectra+of+CdOPA+and+dotsOPA.py

示例6: Apr8Raman

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Apr8Raman():
    os.chdir('/home/chris/Documents/DataWeiss/150408')
    fig = figure()
    a = RamanSpectrum('150408_15.txt')
    a.autobaseline((268,440,723,915,1200,1391,1505,1680),specialoption='points', order = 4)
    a.smooth(window_len=11,window = 'SG')
    #a+=800
    
    b = RamanSpectrum('150408_02.txt')
    #b = autobaseline(b,(200,1700),leaveout=(200,300), order = 4)
    b.autobaseline((268,440,723,915,1200,1391,1505,1680),specialoption='points', order = 4)
    b.smooth(window_len=11,window = 'SG')
    
    (normalize(MeOTPRef,(0,10000))*4000+1000).plot(color ='b',linewidth=2)
    a.plot(color = 'k',linewidth = 2)
    b.plot(color = 'r', linewidth = 2)
    
    ylim(-500,6000)
    xlim(200,1675)
    
    
    
    legend(['MeOTP ref', 'MeOTP treated','Native ligand only'])
    
    ylabel('Raman Intensity (a.u.)')
    xlabel('Raman Shift (cm$^{-1}$)')
    
    figure()
    title('Washing')
    a = RamanSpectrum('150408_11.txt')
    b = RamanSpectrum('150408_02.txt')
    a = autobaseline(a, (200,1700),leaveout=(200,300),order=4)
    b = autobaseline(b,(200,1700),leaveout=(200,300), order = 4)
   
    (normalize(ODPARef,(0,10000))*4000+2000).plot(color ='b',linewidth=2, label='ODPA Ref')
    a.plot(color = 'r',label='washed 5x')
    b.plot(color = 'k',label='washed 4x')
    #a= fitspectrum(b,(900,1150),'SixGaussian', [200,200,200,200,200,200,950,990,1026,1064,1087,1115,10,10,10,10,10,10,1,-100])
    #plot(a[1],a[2],linewidth =3,label='fit')
    legend()
    ylabel('Raman Intensity (a.u.)')
    xlabel('Raman Shift (cm$^{-1}$)')
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:45,代碼來源:OutlineFigs.py

示例7: Apr8Raman_forVictor

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Apr8Raman_forVictor():
    os.chdir('/home/chris/Documents/DataWeiss/150408')
    fig = figure(figsize=(12,6))
    subplot(121)
    a = RamanSpectrum('150408_15.txt')
    a = autobaseline(a, (200,1700),leaveout=(200,300),order=4)
    a+=800
    
    
    
    b = RamanSpectrum('150408_02.txt')
    b = autobaseline(b,(200,1700),leaveout=(200,300), order = 4)
    
    (normalize(MeOTPRef,(0,10000))*4000+2000).plot(color ='b',linewidth=2,label = 'thiophenolate reference')
    a.plot(color = 'k',linewidth = 2)
    b.plot(color = 'r', linewidth = 2)
    
    ylim(-500,10000)
    xlim(740,1675)
 
    arrowprops={'width':1,'headwidth':3,'color':'k'}
    ylabel('Raman Intensity (a.u.)')
    xlabel('Raman Shift (cm$^{-1}$)')
    annotate('C-S-H bend', (913,2830),xytext = (913,3300), xycoords = 'data',arrowprops = arrowprops,horizontalalignment='center' )
    subplot(122)
    e = RamanSpectrum('150408_13.txt')
    e.autobaseline((2500,3600),leaveout=(200,300),order=2)
    e.autobaseline((2500,2800),leaveout=(200,300), order = 1,join='end')
    e+=800
    
    
    
    f = RamanSpectrum('150408_03.txt')
    f.autobaseline((2500,3600),leaveout=(200,300), order = 2)
    f.autobaseline((2500,2800),leaveout=(200,300), order = 1,join='end')
    
    (normalize(MeOTPRef,(0,10000))*4000+2000).plot(color ='b',linewidth=2)
    e.plot(color = 'k',linewidth = 2, )
    f.plot(color = 'r', linewidth = 2)
    annotate('S-H stretch', (2560,3370),xytext = (2600,4500), xycoords = 'data',arrowprops = arrowprops,horizontalalignment='center' )
   
    ylim(-500,10000)
    xlim(2500,3200)
    legend(['thiophenol reference','CdSe thiophenolate-treated','CdSe native ligand only'])
    
    ylabel('Raman Intensity (a.u.)')
    xlabel('Raman Shift (cm$^{-1}$)')

   # savetxt()

    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:53,代碼來源:march24.py

示例8: calculate_enchancement

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def calculate_enchancement():
    global r,s
    #### Calc SERS enhancement on
    os.chdir('/home/chris/Documents/DataWeiss/150109')

    r = RamanSpectrum('1_MeTOP roughened Ag_1.txt')
    s = RamanSpectrum('2_MeOTP smooth silver_1.txt')
    r.autobaseline((500,1750),order=0)
    s.autobaseline((500,1750),order=0)
    on_roughened = calc_area(r,(1050,1130))*100 #### multiply, because used filter 0.01
    on_smooth = calc_area(s,(1050,1130))
    print 'hormalized area on roughened substrate =', on_roughened  
    
    print 'hormalized area on roughened substrate =', on_smooth
    r.plot(color = 'r')
    s.plot(color = 'k')
    legend(['roughened', 'smooth (x100)'],loc=2)
    annotate('x100', (0.6,0.7), xycoords = 'axes fraction', size = 24,color = 'k')
    print 'Approximate surface enhancement =',on_roughened/on_smooth
    xlabel('Raman Shift cm$^{-1}$')
    ylabel('Intensity a.u.')
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:24,代碼來源:SubgroupJan12.py

示例9: Feb10

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Feb10():
    figure()
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150210/43_ long scan.SPE')
    
    
    adding  = pandas.Series([NaN]*len(arange(300,1500,0.5)),arange(300,1500,0.5))
    
    d=a.append(adding)
    
    d = d.interpolate(method='index')

    d = d[arange(300,1500,0.5)]
    
    e = FourierFilter(d,width = 1100)
    
    e.plot()
    
    
    b = RamanSpectrum('/home/chris/Documents/DataWeiss/150210/44.SPE')
    c=b+a
    a.autobaseline((300,1600),order = 4)
    #a = smooth(a,window_len=9)
    
    b.autobaseline((300,1600),order = 4)
    #b=smooth(b,window_len=9)
    
    #a.plot()
    #b.plot()
    
    c= autobaseline(c,(300,1600),order = 4)
    c = smooth(c, window_len=9)
    #c.plot()
    legend(['a','d','e'])
    
   
    
    return d
開發者ID:cmthompson,項目名稱:data,代碼行數:39,代碼來源:Feb9.py

示例10: CdMBTinDMF

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def CdMBTinDMF():
    clf()
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150709/150709_01.txt')#### DMFonly
    b = RamanSpectrum('/home/chris/Documents/DataWeiss/150709/150709_02.txt')#### 510mg DMF with 200 mgCdMBT
    a.autobaseline((523,935,1336,1780),order = 3,specialoption='points')
    b.autobaseline((523,935,1336,1780),order = 3,specialoption='points')
    a[:]*=4720
    a[:]/=6256
   
    c = RamanSpectrum(b-a)
    c.plot()
    r = fitspectrum(c,(1070,1105),'xVoigt',[10000,1088,15,6,0,0])
    plot(r.x,r.y,'s-',linewidth=2)
    for i in r.peaks:
        plot(r.x,i)
    print r.areas
    print r.params[0][2:4]
    CdMethylTPRef.plot()
        
    
#    def difference(c): return sum((b[200:1700]-c*a[200:1700])**2)
#    r = minimize(difference,[1])
    
    return r.params
開發者ID:cmthompson,項目名稱:data,代碼行數:26,代碼來源:June22_Has+the+nice+spectra+of+CdOPA+and+dotsOPA.py

示例11: Dec15

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def Dec15():
    """PPAcapped CdS in water Raman"""
    cla()
    ODPARef.plot()
    OPARef.plot()
    
    ax = subplot(111)
    a = RamanSpectrum('151215/151215_04.txt')#,name='DMF 65 mM')
    a.autobaseline((295,350,473,580,755,988,1188,1317,1756,1853,2296,2400,2600),join='end',order = 8,specialoption='points')    
    a.plot()
    b=RamanSpectrum('151215/151215_02.txt')#,name='7uM PPAcapped dots in water/DMF')
    b[:]/=3
    b.autobaseline((295,350,473,580,755,961,1317,1756,1853,2296,2400,2600),join='end',order = 8,specialoption='points')    
    b.plot()
    c=RamanSpectrum('151215/151215_05.txt')#,name = 'PPA')
   
    c.autobaseline((295,350,473,580,755,961,1317,1756,1853,2296,2400,2600),join='end',order = 8,specialoption='points')    
    c.plot()
    
    
    quickoffset(ax,rnge=(200,1600))
    return 0 
開發者ID:cmthompson,項目名稱:data,代碼行數:24,代碼來源:Dec15notebook.py

示例12: CdSvsCdSe

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def CdSvsCdSe():
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150521/150521_05.txt')
    r = removespikes(r)
    
    r.autobaseline((119,286), order = 0)
    r.autobaseline((286,1151), order = 4, join = 'start')
    r.autobaseline((1151,1560), order = 3, join = 'start')
    r.smooth()
    
    r.plot(label = 'CdSe')
    
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150601/150601_07.txt')
    c = RamanSpectrum('/home/chris/Documents/DataWeiss/150601/150601_08.txt')
    
    r = add_RamanSpectra(r,c)
    r = SPIDcorrect633(r)
    r = removespikes(r)
    r.autobaseline((145,1148), order = 3)
    r.autobaseline((1148,1253), order = 1,join='start')
    r.autobaseline((1253,2000), order = 3,join='start')
    r.autobaseline((2000,3600), order = 3,join='start')
    r.values[:] = r.values[:]*5
    #r.smooth()
    
    r.plot(label='CdS')
    legend(['CdSe','CdS'])
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:29,代碼來源:May29.py

示例13: June1

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def June1():
    clf()
    subplot(122)
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150601/150601_07.txt')
    c = RamanSpectrum('/home/chris/Documents/DataWeiss/150601/150601_08.txt')
    
    r = add_RamanSpectra(r,c)
    r = SPIDcorrect633(r)
    r = removespikes(r)
    r.autobaseline((145,1148), order = 3)
    r.autobaseline((1148,1253), order = 1,join='start')
    r.autobaseline((1253,2000), order = 3,join='start')
    r.autobaseline((2000,3600), order = 3,join='start')
    r.values[:] = r.values[:]*5
    #r.smooth()
    
    r.plot()
    
    r= RamanSpectrum('/home/chris/Documents/DataWeiss/150601/150601_09.txt')
    c = RamanSpectrum('/home/chris/Documents/DataWeiss/150601/150601_10.txt')
    
    r = add_RamanSpectra(r,c)
    r = SPIDcorrect633(r)
    #r = removespikes(r)
    r.autobaseline((145,1148), order = 2)
    r.autobaseline((1148,1253), order = 1,join='start')
    r.autobaseline((1253,1700), order = 3,join='start')
    r.autobaseline((1700,3600), order = 3,join='start')
    r.values[:] = r.values[:]*5
    #r.smooth()
    r.plot()
    legend(['oleate', 'exchanged'])
    
    subplot(121)
    
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150529/150529_05.txt')
   
    r.autobaseline((147,2000), order =3)
    r.autobaseline((147,356), order = 1)
    r.autobaseline((356,389), order = 1, join = 'start')
    r.autobaseline((389,892), order = 1, join = 'start')
    r.autobaseline((892,923), order = 1, join = 'start')
    r.autobaseline((923,1185), order = 1, join = 'start')
    r.autobaseline((1185,1211), order = 1, join = 'start')
    r.autobaseline((1211,1679), order = 2, join = 'start')
    r.autobaseline((1679,1702), order = 2, join = 'start')
    r.autobaseline((1702,1900), order = 3, join = 'start')
    
    r.smooth()
    r.plot()
    
    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150527/150527_06.txt')
    
    r = SPIDcorrect633(r)
    r.autobaseline((98,765), order = 4)
    r.autobaseline((765,839), order = 2, join = 'start')
    r.autobaseline((839,1456), order = 4, join = 'start')
    r.autobaseline((1456,1470), order = 2, join = 'start')
    r.autobaseline((1470,1900), order = 4, join = 'start')
    r.smooth()
    r.plot()
    
   
    legend(['exchanged', 'oleate'])
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:67,代碼來源:May29.py

示例14: SH

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def SH():
    
    
    
    os.chdir('/home/chris/Documents/DataWeiss/150728')
    cdmbt=copy.deepcopy(CdMethylTPRef)
    mbt=copy.deepcopy(MethylTPRef)
    cdmbt.autobaseline((193,4000),order = 0)
    mbt.autobaseline((193,4000),order = 0)

    mbt[:]/=95
    cdmbt[:]/=5
    cdmbt.to_csv('/home/chris/Dropbox/Ken/CdMBT2.csv')
   
    
    
    fig1 = figure(figsize=(6, 12)) 
    

    
   
    
    A = RamanSpectrum('filesA.txt')  ##450 eq
    B = RamanSpectrum('filesB.txt')  #200 eq MBT
    C = RamanSpectrum('filesC.txt') #100 eq MBT
    D = RamanSpectrum('filesD.txt') # 80 eq MBT
    E = RamanSpectrum('filesE.txt') # 50 eq MBT
    F = RamanSpectrum('filesF.txt')  #25 eq MBT
    G = RamanSpectrum('/home/chris/Documents/DataWeiss/150408/150408_03.txt')
    
    G.autobaseline((2500,2700,3100,3200),order = 2, specialoption='points')
    
    for z in [A,B,C,D,E,F]:
        #z = SPIDcorrect633(z)
        z.autobaseline((200,361),order = 1,join='start')
        z.autobaseline((361,394),order = 2,join='start')
        z.autobaseline((394,647),order = 2,join='start')
        z.autobaseline((647,682),order = 0,join='start')
        z.autobaseline((682,923),order = 0,join='start')
        z.autobaseline((923,955),order = 0,join='start')
        z.autobaseline((955,1187),order = 0,join='start')
        z.autobaseline((1187,1214),order = 0,join='start')
        z.autobaseline((1214,1437),order = 0,join='start')
        z.autobaseline((1437,1462),order = 0,join='start')
        z.autobaseline((1462,1675),order = 2,join='start')
        z.autobaseline((1675,1701),order = 0,join='start')
        z.autobaseline((1701,1900), order =2,join='start')
        z.autobaseline((1900,2400), order =5,join='start')
        z.autobaseline((2400,3200),order = 0,join='start')
        z.autobaseline((3200,3600),order = 0,join='start')
       # z.autobaseline((981,1013,1098,1141,1251,1491),order =3,specialoption='points', join='start')
        
        z[:]/=50
        z.smooth()
        z-=z[2402]
        
    for z in [G]:

        z.autobaseline((2400,3200),order = 0)
        z[:]/=50
        z.smooth()
        z-=z[2402]
        
        
    mbt[:]+=700 
    mbt.set_name('mmmmmm')
    A[:]*=2
    A[:]+=600
    B[:]+=500
    C[:]+=400
    D[:]+=300
    E[:]+=200
    F[:]+=100
    G[:]*=10
    
    for z in [mbt,A,B,C,D,E,F,G]:
        z.to_csv('/home/chris/Dropbox/Ken/SHregion/'+z.name[-5]+'.csv')
        
 
    
    mbt.plot()
    A.plot()
    B.plot()
    C.plot()
    D.plot()
    E.plot()
    F.plot()
    G.plot()
    
    fs = 14
    anx = 2605
    annotate('solid MBT',(anx,740), fontsize=fs)
    annotate('450 eq MBT',(anx,620), fontsize=fs)
    annotate('200 eq MBT',(anx,520), fontsize=fs)
    annotate('100 eq MBT',(anx,420), fontsize=fs)
    annotate('80 eq MBT',(anx,320), fontsize=fs)
    annotate('50 eq MBT',(anx,220), fontsize=fs)
    annotate('25 eq MBT',(anx,120), fontsize=fs)
    annotate('0 eq',(anx,10), fontsize=fs)    
    
#.........這裏部分代碼省略.........
開發者ID:cmthompson,項目名稱:data,代碼行數:103,代碼來源:KenpaperSH.py

示例15: SH

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import autobaseline [as 別名]
def SH():
    
    
    
    os.chdir('/home/chris/Documents/DataWeiss/150728')
    cdmbt=copy.copy(CdMethylTPRef)
    mbt=copy.copy(MethylTPRef)
    cdmbt.autobaseline((1000,1200),order = 0)
    mbt.autobaseline((1000,1200),order = 0)

    mbt[:]/=95
    cdmbt[:]/=5
    cdmbt.to_csv('/home/chris/Dropbox/Ken/CdMBT2.csv')
   
    
    
    fig1 = figure(figsize=(6, 12)) 
    

    
   
    
    A = RamanSpectrum('filesA.txt')  ##450 eq
    B = RamanSpectrum('filesB.txt')  #200 eq MBT
    C = RamanSpectrum('filesC.txt') #100 eq MBT
    D = RamanSpectrum('filesD.txt') # 80 eq MBT
    E = RamanSpectrum('filesE.txt') # 50 eq MBT
    F = RamanSpectrum('filesF.txt')  #25 eq MBT
    G = RamanSpectrum('/home/chris/Documents/DataWeiss/150408/150408_03.txt')
    
    G.autobaseline((2500,2700,3100,3200),order = 2, specialoption='points')
    for z in [A,B,C,D,E,F,G]:

        z.autobaseline((2400,3200),order = 0)
        z[:]/=50
        z.smooth()
        z-=z[2402]
        
        
    mbt[:]+=700 
    mbt.set_name('mmmmmm')
    A[:]*=2
    A[:]+=600
    B[:]+=500
    C[:]+=400
    D[:]+=300
    E[:]+=200
    F[:]+=100
    G[:]*=10
    
    for z in [mbt,A,B,C,D,E,F,G]:
        #z.to_csv('/home/chris/Dropbox/Ken/SHregion/'+z.name[-5]+'.csv')
        pass
 
    
    mbt.plot()
    A.plot()
    B.plot()
    C.plot()
    D.plot()
    E.plot()
    F.plot()
    G.plot()
    
    fs = 14
    anx = 2605
    annotate('solid MBT',(anx,740), fontsize=fs)
    annotate('450 eq MBT',(anx,620), fontsize=fs)
    annotate('200 eq MBT',(anx,520), fontsize=fs)
    annotate('100 eq MBT',(anx,420), fontsize=fs)
    annotate('80 eq MBT',(anx,320), fontsize=fs)
    annotate('50 eq MBT',(anx,220), fontsize=fs)
    annotate('25 eq MBT',(anx,120), fontsize=fs)
    annotate('0 eq',(anx,10), fontsize=fs)    
    
    xlim(2500,3030)
    ylim(-20,1300)
    return 0


    
開發者ID:cmthompson,項目名稱:data,代碼行數:80,代碼來源:Cdenriched-constraint+widths+and+amps.py


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