Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
jeanne
Posted - 09/16/2003 : 6:13:31 PM Hello!
I try to write a script to fit 400 graphs with the same fitting Lorentz function (2 peaks). It works if I fit only one graph, but when I try to integrate the fitting routine in a loop it doesn’t work anymore.
Can anybody help me? Thank you in advance !! Jeanne.
Here is the script:
for (ii=10;ii<32;ii ++) {
window -n wks jeanne4_$(ii);# new worksheet; worksheet -a 2;# init column; open -w G:\home\AS $(ii) 001.txt;# file path; window -r AS$(ii)001 LOR001$(ii);# rename
nlsf.init(); // initialize the fit ; nlsf.func$=Gauss; // define function to be used during fitting ; nlsf.fitData$=LOR001$(ii)_intensity; // define data to be fitted; nlsf.numReplica=1; // implies 2 peaks ; nlsf.p1=150; // initialize y0 ; nlsf.p2=-88; // init xc1(center 1) ; nlsf.p5=88; // init xc2 (center 2) ; nlsf.p3=18; // init w1; nlsf.p6=23; // init w2; nlsf.p4=5000; // init A1 ; nlsf.p7=5000; // init A2 ; nlsf.funcX$=LOR001$(ii)_a; // X data to be used to create fit dataset ; nlsf.funcCol$=LOR001$(ii)_c; // fit dataset;
nlsf.fit(20); // perform 20 iterations ; nlsf.end(); // report fit results to log and fit label;
};
I still have to do the following :
#PURPOSE: put the data in a array:; #first colunm number of graph 1 to 400; #2nd height pic1 Y0 en X0; #3rd width half hight W0; #4th area pic1 A0; #5th height pic2 Y1 en X1; #6th width half hight W1; #7eme area pic2 A1; #8eme height average Y3; #9eme width half hight average W3; #10eme area average A3;
1 L A T E S T R E P L I E S (Newest First)
Mike Buess
Posted - 09/26/2003 : 10:13:34 AM Hi Jeanne,
I think you'll have to tell us where and how the script goes wrong. The script is fairly long and we need a clue about where to focus.