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
 fitting multipeaks Gauss

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
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?
2   L A T E S T    R E P L I E S    (Newest First)
bea-origin Posted - 11/05/2002 : 11:17:30 AM
Hi Mike!
Thank you very much!
Now it works perfectly.

Mike Buess Posted - 11/05/2002 : 11:01:18 AM
You might try using the mks1 and mks2 system variables to mark the beginning and end of your fitting range. See this forum topic for details.

Mike Buess
Origin WebRing Member

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