#pragma rtGlobals=1 // Use modern global access method. //#include Function twogauss(w,x) : FitFunc Wave w Variable x //CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will //CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog. //CurveFitDialog/ Equation: //CurveFitDialog/ f(x) = W_0 + W_1*x + W_2*exp(-(x-W_3)^2/W_4^2)+W_5*exp(-(x-W_6)^2/W_7^2) //CurveFitDialog/ End of Equation //CurveFitDialog/ Independent Variables 1 //CurveFitDialog/ x //CurveFitDialog/ Coefficients 8 //CurveFitDialog/ w[0] = W_0 //CurveFitDialog/ w[1] = W_1 //CurveFitDialog/ w[2] = W_2 //CurveFitDialog/ w[3] = W_3 //CurveFitDialog/ w[4] = W_4 //CurveFitDialog/ w[5] = W_5 //CurveFitDialog/ w[6] = W_6 //CurveFitDialog/ w[7] = W_7 return w[0] + w[1]*x + w[2]*exp(-(x-w[3])^2/w[4]^2)+w[5]*exp(-(x-w[6])^2/w[7]^2) End //return w[0] + w[1]*x + w[2]*x^2 + w[3]*x^3 + w[4]*exp(-(x-w[5])^2/w[6]^2)+w[7]*exp(-(x-w[8])^2/w[9]^2) //return W[0]+W[1]*exp(-(x-W[2])^2/W[3]^2)+W[4]+W[5]*exp(-(x-W[6])^2/W[7]^2) //End Macro load() //string filename Killwaves/A/Z NewPath/O path "C:\Program Files\Andor Newton\data" //filename=".asc" //specify file location of data LoadWave/G/A/P=path //filename Silent 1 ; PauseUpdate Display/N = Spectrum wave1 vs wave0 ModifyGraph tick=2,mirror=1 Label left "Intensity (a.u.)" Label bottom "Raman Shift (cm\\S-1\\M)" showinfo end macro //Macro basefitting (numspec) //variable numspec, i //i=1 //do //while (i