| T O P I C R E V I E W |
| TinaPLI |
Posted - 02/20/2004 : 05:14:46 AM Hello everybody;
I wrote a labtalk script to perform fits on an array of about 30x30 spectra, which works perfect with one exemption: For some spectra an error message number 28037 appears indicating that the initial parameter set is not appropriate. No problem, after the fit I set the parameters new if nlsf.cor is < 0.9 and repeat the fit until nlsf.cor is >0.9. How can I suppress the message box and forse the script to go on to the next command automatically. I do not want to hit 20 times the okay button as the script is suppose to run over night.
Who can help me, I would like to stay with lab talk for the moment.
Thanks Martina
crusila part of the script:
nlsf.cleanupfitdata(); //nlsf.msgPrompt=0; //nlsf.msgPrompt=2; nlsf.fitData$ = %r_int$(l); Zaehler=0; repeat 15 { zaehler=zaehler+2; nlsf.simplex(400); type %s; nlsf.xmode = 2; nlsf.funcx$ = %r_lambdac; //use as X dataset nlsf.funccol$ = %r_fit$(l); //dataset to store fitted Y values nlsf.makecurve(func); //dataset generated for the fitted curve If (nlsf.cor > 0.9) {window -cd %h; break; } NLSF.P2=720.0-12+Zaehler; //NLSF.P3=1.27; //NLSF.P4=6000; } |
| 3 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 02/24/2004 : 1:51:41 PM Hi Tina,
You might try to trap the nlsf errors. The following modification to your script is probably just a start...
nlsf.cleanupfitdata(); nlsf.msgPrompt=0; nlsf.fitData$ = %r_int$(l); Zaehler=0; repeat 15 { zaehler=zaehler+2; nlsf.simplex(400); type %s; if( nlsf.err ) { type error $(nlsf.err); break; }; nlsf.xmode = 2; nlsf.funcx$ = %r_lambdac; //use as X dataset nlsf.funccol$ = %r_fit$(l); //dataset to store fitted Y values nlsf.makecurve(func); //dataset generated for the fitted curve if (nlsf.cor > 0.9) { window -cd %h; break; } NLSF.P2=720.0-12+Zaehler; //NLSF.P3=1.27; //NLSF.P4=6000; }
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 02/24/2004 1:55:59 PM |
| TinaPLI |
Posted - 02/24/2004 : 11:51:55 AM unfortunately not, the system claimed to be busy and I had to use the task manager to stop the program. Tina
|
| Mike Buess |
Posted - 02/20/2004 : 08:16:27 AM Hi Martina,
I see you commented out nlsf.msgprompt=0. Didn't that work?
Mike Buess Origin WebRing Member |