The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 multiple fits

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000