I thought i'd better add the code of the fitting script in written form too, not just the picture....
DATA!wks.col(C1);
DATA!wks.insert(A);
worksheet -t $(1) 4;
col(A)=data(1,end-start+1,1);
window -n data FIT;
FIT!wks.addcol(A);
worksheet -t $(1) 4;
FIT!wks.addcol(B);
col(A)=data(1,end-start+1,1);
for(j=1;j<=all;j+=1) {
nlsf.func$ = GaussAmp;
//y0=0;
//xc=10;
//w=200;
//A=1;
nlsf.cleanupfitdata();
nlsf.fitdata$ = DATA_C$(j);
nlsf.iterate(100);
nlsf.funcx$ = DATA_A; //use as X dataset
nlsf.xmode = 2;
nlsf.funccol$ = FIT_B; //Store fitted y data
nlsf.makecurve(func); //dataset generated for the fitted curve
DATA_C$(j)-=FIT_B;
};
window -cd;
delete DATA_A;