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
 Lorentzian FIT with bounds

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
touch41 Posted - 04/05/2012 : 07:24:27 AM
Hi everyone!

I want to fit several Lorentzian peaks using script, and I'd like to set some boundaries on such fits in order to have the procedure more reliable.
In particular it would be important to set the area>0.

Some peaks are single so I fit them using these commands:

nlbegin iy:= range func:=Lorentz nltree:=myt;
nlfit 200;

Others are double so I prefer to fit them using:

fitpeaks iy:=range2 type:=lorentz npeaks:=2;


I've found this commands on the internet for fixing bounds:
nltree.ubn --> Upper Bounds Value
nltree.lbn --> Lower Bounds Value

but no examples on how to use these commands...any clue?

What about fixing boundaries with the fitpeaks command?

Thank you very much!:-)

Touch




Origin Ver.8.5 and Service Release 1
Operating System: Win 7 64bit
3   L A T E S T    R E P L I E S    (Newest First)
touch41 Posted - 04/25/2012 : 09:18:39 AM
I will try!
Thank you for your answer!:-)

Matteo
Kathy_Wang Posted - 04/09/2012 : 9:17:06 PM
Sorry, the example script I provided was not quite right. In fact, when you are setting boundary conditions in non-linear fit with script, you also need to turn the boundaries on (as their default settings are disabled). Here is a better example,

nlbegin iy:=<active> func:=Lorentz nltree:=myt;
myt.lb4 = 0; 
myt.lbon4 = 1;//here the newly set myt.lb4 value is enabled
nlfit;



Kathy
Originlab
Kathy_Wang Posted - 04/09/2012 : 05:48:48 AM
Hi,
The nltree.ubn and nltree.lbn commands could be used after you start a non-linear fit with nlbegin/nlbeginr command. An example of how to use it is as following:

nlbegin iy:=<active> func:=Lorentz nltree:=myt;
//Set the boundary of area (Area>0)
myt.lb4 = 0;
nlfit;


And the fitpeaks command doesn't support to set boundary values. But to set boundary values for multiple peak fitting, you may also use "nlbegin" command, and set the replica value as peak numbers minus one. Here is an example with multiple peak fit (suppose there are 3 peaks):

nlbegin iy:=<active> func:=Lorentz nltree:=myt replica := 2;
//You may check the sequence of parameters by opening the NLFit parameter dialog
nlpara;
//After setting parameters, you could start the fitting.
nlfit;


Hope this will be helpful!


Kathy
Originlab

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