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


Python RamanSpectrum.plot方法代碼示例

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


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

示例1: CdSvsCdSe

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [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

示例2: figure1

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def figure1():
    os.chdir('/home/chris/Documents/DataWeiss/150113')

    r = RamanSpectrum('15_CdSeMTP dropcast_1.txt')
    s = RamanSpectrum('18_1.txt')
    r = smooth(r)
    s= smooth(s)
    r+=100
    s+=100
    r.plot()
    s.plot()
    
    figure()
    r = autobaseline(r,(467,1463),order=3)+200
    r.plot()
    
    s = autobaseline(s,(467,1463),order=3)+400
    s.plot()
    
    MBT = RamanSpectrum('/home/chris/Documents/DataWeiss/141014/4_methoxythiophenol_1.csv')
    MBT-=min(MBT[0:2000])
    MBT/=max(MBT[0:2000])/500
    MBT.plot()
    
    legend(['Ag/Hexanethiol', 'Ag/Hexanethiol + CdSeMTP', 'CdMTP ref'])
    
    
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:30,代碼來源:SubgroupJan12.py

示例3: May14

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def May14():
    clf()
    s = RamanSpectrum("/home/chris/Documents/DataWeiss/150514/150514_12.txt")
    a = RamanSpectrum("/home/chris/Documents/DataWeiss/150514/150514_13.txt")
    b = RamanSpectrum("/home/chris/Documents/DataWeiss/150514/150514_14.txt")
    c = add_RamanSpectra(a, b)
    # c = add_RamanSpectra(s,c)

    d = RamanSpectrum("/home/chris/Documents/DataWeiss/150514/150514_15.txt")
    v = RamanSpectrum("/home/chris/Documents/DataWeiss/150514/150514_16.txt")
    z = 0.15

    e = subtract_RamanSpectra(c, d * z)

    # e.smooth()
    l = subtract_RamanSpectra(c, v * z)
    # l.smooth()
    e = RamanSpectrum(e.append(l))
    e = autobaseline(e, (180, 277), order=4)
    e = autobaseline(e, (277, 1700), order=4, join="start")
    # j = subtract_RamanSpectra(c,RamanSpectrum(pandas.Series(f[2],f[1])))
    e.plot()

    # d.plot()
    # v.plot()

    # CdMeOTPRef.index = array(CdMeOTPRef.index)-5
    (CdMeOTPRef / 120).plot()
    (MeOTPRef / 240).plot()

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

示例4: Apr15

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def Apr15():
    def gauss(x,A,G,m,b):return A*exp(-(1090-x)**2/G)+m*x+b
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150415/150415_15.txt')
    a = SPIDcorrect(a)
    noise = calc_noise(a,(900,1000))
    start = argmin(abs(1065-array(a.index)))
    end = argmin(abs(1115-array(a.index)))
    x = array(a.index[start:end])
    y = a.values[start:end]
    guess = [10,15,-1,y[0]+1000]
    
    peak = scipy.optimize.curve_fit(gauss, x, y, guess)
    print peak[0]
    
    
    a.plot(color = 'k')
    #plot(x,gauss(x,*peak[0]))
    #
    print 'signal to noise =', sqrt(peak[0][0]/noise)
    ylim(27000,37000)
    ylabel('Raman Intensity (a.u.)')
    xlabel('Raman Shift (cm$^{-1}$)')
    
    
    ax3 = gcf().add_axes((0.6,0.6,0.25,0.25))
    a.plot(color='k', ax = ax3)
    ax3.annotate('S/N: '+str(1.66), (1080, 28700), textcoords = 'data', size = 18)
    ax3.set_ylim(27500,29300)
    ax3.set_xlim(900,1200)
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:32,代碼來源:march24.py

示例5: Mar31

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def Mar31():
    
    subplot(221)
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150331/150331_02.txt')
    a = autobaseline(a,(141,1700),order = 4)
    a = smooth(a)+50
    #b = RamanSpectrum('/home/chris/Documents/DataWeiss/150331/150331_03.txt')
    #c =add_RamanSpectra(a,b)
    a.plot(color = 'k')
    

    
    ylim(0,200)
    xlim(140,1700)
    
    subplot(222)
    
    a.plot(color = 'k')
    xlim(2700,3100)
    ylim(50,100)
    
    subplot(223)
    (RamanSpectrum('/home/chris/Documents/DataWeiss/140918/9_CdMeOTP.SPE')/10-1800).plot(color = 'b')
    CdODPARef.plot(color = 'r')
    xlim(100,1700)
    ylim(0,5000)
    
    subplot(224)
    (RamanSpectrum('/home/chris/Documents/DataWeiss/140918/7_CdMeOTP.SPE')-40000).plot(color='b')
    (CdODPARef+10000).plot(color = 'r')
    xlim(2700,3100)
開發者ID:cmthompson,項目名稱:data,代碼行數:33,代碼來源:march24.py

示例6: m

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def m():

    r = RamanSpectrum('/home/chris/Documents/DataWeiss/150304/2_ light.SPE')
    v = smooth(r)
    for i in range(5):
        v = smooth(v)
    v.plot(marker='s')
    r.plot()
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:11,代碼來源:NoiseAnalysis.py

示例7: Mar24

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def Mar24():  ########### Raman of older red dots.  These have polystyrene or toluene on them. 
    figure()
    j = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_22.txt')
    k = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_23.txt')
    l = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_26.txt')
    m = add_RamanSpectra(j,k)
    m=add_RamanSpectra(m,l)
    m=autobaseline(m,(0,3300),order = 0)
    m=smooth(m)
    m.plot(label='NativeLigands')
    
    j = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_24.txt')
    k = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_25.txt')
    l = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_26.txt')
    m = add_RamanSpectra(j,k)
    m=add_RamanSpectra(m,l)
    m=autobaseline(m,(0,3300),order = 0)
    
    m=smooth(m)
    m.plot(label='NativeLigands')
    
    j = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_28.txt')
    k = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_29.txt')
    
    m = add_RamanSpectra(j,k)
    m=autobaseline(m,(0,3300),order = 0)
    m=smooth(m)
    
    m.plot(label='NativeLigands')
    
    ref = RamanSpectrum('/home/chris/Documents/DataWeiss/141007/Liquid sample corrected-spectrum of toluene.txt')
    ref.plot(label = 'toluene')
    legend()
    title('Native Ligand')
    
    
    figure()
    j = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_34.txt')
    m=smooth(j)
    m.plot(label='MeOTP')
    
    
    j = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_35.txt')
    k = RamanSpectrum('/home/chris/Documents/DataWeiss/150324/NativeLigand_Red_36.txt')
   
    m = add_RamanSpectra(j,k)
   
    m=smooth(m)
    m.plot(label='MeOTP')
    
    title('MeOTP treated')
    
    
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:56,代碼來源:march24.py

示例8: Jan22

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def Jan22():### data from trying out the cryostat
    from scipy import optimize
    os.chdir('/home/chris/Documents/DataWeiss/150121')
    
    
    red = RamanSpectrum('17.SPE')
    red = normalize(red,(0,1600))
    red.plot(label='647 nm')
    
    green = RamanSpectrum('14.SPE')
    green=normalize(green,(0,1600))
    green.plot(label = '514 nm')
    
    
    cdRef=normalize(CdMeOTPRef,(0,1600))
    cdRef.plot(label = 'CdMeOTP Reference')
    
    mtpref = normalize(MeOTPRef,(0,1600))
    mtpref.plot(label = 'MeOTP Reference')
    xlim(1050,1150)
    
    legend()
    
    def singlegauss(x, A1, x1, c1):return A1*exp(-(x-x1)**2/(2*c1**2)) 
    def doublegauss(x, A1, x1, c1,A2,x2,c2):return A1*exp(-(x-x1)**2/(2*c1**2)) +A2*exp(-(x-x2)**2/(2*c2**2))
    green = autobaseline(green, (1050,1150), order = 0)
    print argmin(abs(green.index-1100))
    x = array(green.index[620:680])
    y = array(green.values[620:680])  
    print x
    
    
    r = list(optimize.curve_fit(singlegauss,x,y,[1,1087,20])[0])
    figure()
    plot(x,y,'s')
    plot(x,singlegauss(x,*r),'k')
    print r
    
    r = list(optimize.curve_fit(doublegauss,x,y,[1,1080,10,1,1090,10])[0])
    
    plot(x,doublegauss(x,*r),'r')
    
    
    plot(x,singlegauss(x,r[0],r[1],r[2]),'k.')
    plot(x,singlegauss(x,*r[3:6]),'k.')
    
    
    print r
    
    
         
    xlabel('Raman Shift cm$^{-1}$')
    ylabel('Intensity a.u.')
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:56,代碼來源:SubgroupJan12.py

示例9: May21

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def May21():
    a = RamanSpectrum("/home/chris/Documents/DataWeiss/150521/150521stoic_dots.CSV")
    a[:] -= 0.2
    n_guess = [
        0.05,
        0.05,
        0.05,
        0.1,
        0.05,
        0.05,
        0.05,
        0.05,
        0.05,
        0.05,
        1015,
        1048,
        1075,
        1100,
        1159,
        1169,
        1184,
        1204,
        1221,
        1246,
        20,
        20,
        20,
        40,
        20,
        40,
        20,
        20,
        20,
        20,
        0,
        0.0,
    ]

    a.plot(color="k")
    print a.nearest(1100)
    print a.nearest(1300)
    b = fitspectrum(a, (1000, 1260), "xGaussian", n_guess)
    print b.params[0]
    plot(b.x, b.y, "r")
    print len(b.x)
    print len(b.peaks)
    # plot(b.x,b.peaks[0])
    for p in b.peaks:
        plot(b.x, p, "b")
        # pass

    b = (RamanSpectrum("/home/chris/Documents/DataWeiss/150520/150520_02.txt") - 500) / 10000
    b.plot()
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:56,代碼來源:May8.py

示例10: Feb1

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [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

示例11: May18

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def May18():
    r = RamanSpectrum("/home/chris/Documents/DataWeiss/150518/150518_03b.txt")
    r.autobaseline((100, 763), order=3)
    r.autobaseline((763, 836), order=1, join="start")
    r.autobaseline((836, 1600), order=3, join="start")
    r.plot()

    r = RamanSpectrum("/home/chris/Documents/DataWeiss/150518/150518_05b.txt")
    r.autobaseline((100, 763), order=3)
    r.autobaseline((763, 836), order=1, join="start")
    r.autobaseline((836, 1650), order=3, join="start")
    r.plot()
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:15,代碼來源:May8.py

示例12: smooth_phonon

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def smooth_phonon():
    import RamanTools2
    
    aa = RamanSpectrum('/home/chris/Documents/DataWeiss/141029/4_RubyRed in PS phonon_1.txt')
     
    
    aa-=min(aa)    
    aa/=max(aa)
    aa._smooth(aa.values,window = 'flat')  
    
    aa.plot(color = 'r')
   
    return aa
開發者ID:cmthompson,項目名稱:data,代碼行數:15,代碼來源:OutlineFigs.py

示例13: Apr6

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def Apr6():
    subplot(221)
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150406/150406_02.txt')
    a.plot(color = 'k')
    
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150406/150406_03.txt')
    a.plot(color = 'k')
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150406/150406_04.txt')
    a.plot(color = 'k')
    
    ylim(1000,3500)
    xlim(100,1700)
    
    subplot(222)
    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150406/150406_01.txt')
    a.plot(color = 'k')
    xlim(2700,3100)
    
    subplot(223)
    (RamanSpectrum('/home/chris/Documents/DataWeiss/140918/9_CdMeOTP.SPE')/10-1800).plot(color = 'b')
    CdODPARef.plot(color = 'r')
    xlim(100,1700)
    ylim(0,5000)
    
    subplot(224)
    (RamanSpectrum('/home/chris/Documents/DataWeiss/140918/7_CdMeOTP.SPE')-40000).plot(color='b')
    (CdODPARef+10000).plot(color = 'r')
    xlim(2700,3100)

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

示例14: concentrationdependence

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def concentrationdependence():  ### determine best conc of dots to add to silver to get signal/fluorescend. 

    os.chdir('/home/chris/Documents/DataWeiss/150114')
    
    two_x = RamanSpectrum('1_concentration 2x -highest conc_1.txt')
    two_x+=1000
    one_x = RamanSpectrum('2_1x conc_1.txt')
    one_x+=500
    _25x = RamanSpectrum('3_0_25xconc_1.txt')
    _25x*=10
    _25x-=1000
    _0625x = RamanSpectrum('5_0_0625x conc_1.txt')
    _0625x*=10
    _0625x-=1500
    
    
    two_x.plot()
    one_x.plot()
    _25x.plot()
    _0625x.plot()
    
    legend(['2x','1x','0.25x*10','0.0625x * 10'])
    xlabel('Raman Shift cm$^{-1}$')
    ylabel('Intensity a.u.')
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:27,代碼來源:SubgroupJan12.py

示例15: May16

# 需要導入模塊: from ramanTools import RamanSpectrum [as 別名]
# 或者: from ramanTools.RamanSpectrum import plot [as 別名]
def May16():

    c = RamanSpectrum("/home/chris/Documents/DataWeiss/150516/150516_08.txt")
    c.values[:] *= 3
    c = autobaseline(c, (300, 1700), order=6)
    c.smooth()
    c.plot(label="Cd-enriched")
    a = fitspectrum(
        c,
        (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="Cdenriched fit")

    #    a = RamanSpectrum('/home/chris/Documents/DataWeiss/150516/150516_08.txt')
    #    b = RamanSpectrum('/home/chris/Documents/DataWeiss/150516/150516_07.txt')
    #    c = add_RamanSpectra(a,b)
    #
    #    c = autobaseline(c,(300,1700),order = 4)
    #    c.smooth()
    #    c.plot(label='stoichiometric')
    #

    # CdMeOTPRef.index = array(CdMeOTPRef.index)-5
    # (CdMeOTPRef/120).plot()
    # (MeOTPRef/240).plot()
    a = RamanSpectrum("/home/chris/Documents/DataWeiss/150516/150516_01.txt")
    b = RamanSpectrum("/home/chris/Documents/DataWeiss/150516/150516_02.txt")
    c = RamanSpectrum("/home/chris/Documents/DataWeiss/150516/150516_03.txt") * 4
    d = RamanSpectrum("/home/chris/Documents/DataWeiss/150516/150516_05.txt")
    e = RamanSpectrum("/home/chris/Documents/DataWeiss/150516/150516_06.txt")
    a = add_RamanSpectra(a, b)

    a = add_RamanSpectra(a, c)

    a = add_RamanSpectra(a, d)

    a = add_RamanSpectra(a, e)

    a.values[:] /= 10
    a.plot(label="pieces")

    # ics('/home/chris/Orca/Successful/CdMeOTP/CdMeOTP.out')
    # ics('/home/chris/Orca/CdTP_bridge/CdTP_bridgeDFT.out',color='r')
    # a= fitspectrum(a,(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= 'piecesfit')
    return 0
開發者ID:cmthompson,項目名稱:data,代碼行數:50,代碼來源:May8.py


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