lime/ToBeErased/FranckCondon/Plots.py
def genSpectrum(energies, intensities, widths):
    """ Gaussianifies the points on the spectrum using the input widths
    """

    maxE = max(energies)
    minE = min(energies)
    print("maxE", maxE)
    print("minE", minE)
    energyRange = np.linspace(minE-1000, maxE+1000, 10000)

    intensityRange = [0]*len(energyRange)
    print("Number of points to plot:", len(energyRange))

    # for i in range(len(energies)):
#         print "E: ", energies[i], " I: ", intensities[i]
    for i in range(0,len(energies)):
       # print "Gaussian for intensity i", intensities[i]
        if intensities[i]:
            gauss = G.gaussianGenerator(intensities[i], widths[i], energies[i])
            for x in range(len(energyRange)):
                intensityRange[x] += gauss(energyRange[x])

    ypoints = [gauss(x) for x in energyRange]
    #print "Intensities Gaussian"
   # print sorted(intensityRange, reverse=True)[:60]
    # print "Finished Gaussian"
    return (energyRange, intensityRange)
 Gaussianifies the points on the spectrum using the input widths
    
Gaussianifies the points on the spectrum using the input widths
Gaussianifies the points on the spectrum using the input widths
def genSpectrum(energies, intensities, widths):
    maxE = max(energies)
    minE = min(energies)
    print("maxE", maxE)
    print("minE", minE)
    energyRange = np.linspace(minE-1000, maxE+1000, 10000)
    intensityRange = [0]*len(energyRange)
    print("Number of points to plot:", len(energyRange))
    for i in range(0,len(energies)):
        if intensities[i]:
            gauss = G.gaussianGenerator(intensities[i], widths[i], energies[i])
            for x in range(len(energyRange)):
                intensityRange[x] += gauss(energyRange[x])
    ypoints = [gauss(x) for x in energyRange]
    return (energyRange, intensityRange)
def genSpectrum ( energies , intensities , widths ) : maxE = max ( energies ) minE = min ( energies ) print ( "maxE" , maxE ) print ( "minE" , minE ) energyRange = np . linspace ( minE - 1000 , maxE + 1000 , 10000 ) intensityRange = [ 0 ] * len ( energyRange ) print ( "Number of points to plot:" , len ( energyRange ) ) for i in range ( 0 , len ( energies ) ) : if intensities [ i ] : gauss = G . gaussianGenerator ( intensities [ i ] , widths [ i ] , energies [ i ] ) for x in range ( len ( energyRange ) ) : intensityRange [ x ] += gauss ( energyRange [ x ] ) ypoints = [ gauss ( x ) for x in energyRange ] return ( energyRange , intensityRange )
Gaussianifies the points on the spectrum using the input widths
Gaussianifies the points on the spectrum using the input widths
""" Gaussianifies the points on the spectrum using the input widths
    """ # for i in range(len(energies)): #         print "E: ", energies[i], " I: ", intensities[i] # print "Gaussian for intensity i", intensities[i] #print "Intensities Gaussian" # print sorted(intensityRange, reverse=True)[:60] # print "Finished Gaussian"
energies
intensities
widths