bea-origin |
Posted - 11/05/2002 : 10:07:11 AM Hi! I'm a beginner user of Origin LabTalk language. I'm trying to fit two Gaussian peaks from one spectra. Afterwards I wanted to do it for a lot of spectra but first I have to check if I could do it only for one of them. I use this script
nlsf.init(); // initialize fit nlsf.func$=Gauss; // define function to be used during fitting nlsf.fitData$=A02A1_b; // define data to be fitted nlsf.numReplica=1; // implies 4 peaks nlsf.p1=0; // initialize y0 nlsf.p2=280; // init xc1(center 1) nlsf.p5=290; // init xc2 (center 2) nlsf.funcX$=A02A1_a; // X data to be used to create fit dataset nlsf.funcCol$=A02A1_c; // fit dataset; loop(ii,1,2) { nlsf.p$(3*ii)=5; // initialize widths p3 (w1), p6 (w2), p9 (w3), and p12 (w4) nlsf.p$((3*ii)+1)=50; // initialize Areas p4 (A1), p7 (A2), p10 (A4=3), and p13 (A4) } nlsf.fit(20); // perform 20 iterations nlsf.end(); // report fit results to log and fit label
My spectra have a lot of points but I wanted to fit them in a range of them. How can I change the range to fit? I have tried yet with nslf.dataBegin and nslf.dataEnd and with nslf.xbegin and nslf.xend but it didn't work. I think I have to use the object limit but I didn't find the way. Could you help me? |