Ejemplo n.º 1
0
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