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
 Forum for Origin C
 nlsf lorentz fitting

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
5*10 Posted - 09/21/2005 : 08:46:09 AM
Origin Version (Select Help-->About Origin): 7G SR4 v.7.0552
Operating System:win2k

Hi,
after working six weeks with originC I'm now able to solve several problems. I'm also able to "RTFM" (read the f** manual)or read the topics in the forum to get a hint for solutions.
But in my actual problem I'm not able to find the solution.
I want to fit multiple peaks with the lorentz function. Set my own initial parametersworks fine. Also the trick with the own lorentz function :"lorentzforReplicas" works well(see: http://www.originlab.com/forum/topic.asp?TOPIC_ID=4057 ).
But if I run my Programm the results also have negative y-values. But if I run the implemented menu there are only positive values.

Can anybody help me!!

greet 5*10

Here is my code:

void fit_datasegments3()
{
using nlsf = LabTalk.NLSF;

nlsf.Init();

nlsf.Func$ = "LorentzforReplicas";

nlsf.FitData$ = "A050622a0100_B";

nlsf.numReplica = 1;
nlsf.p1=0;
nlsf.p2=27.998;
nlsf.p3=0.034;
nlsf.p4=300;
nlsf.p5=28.05;
nlsf.p6= nlsf.p3;
nlsf.p7=70;

nlsf.v1 = 1;
nlsf.v2 = 1;
nlsf.v3 = 1;
nlsf.v4 = 1;
nlsf.v5 = 1;
nlsf.v6 = 1;
nlsf.v7 = 1;

string str;

str.Format("mks1 = %d;mks2 = %d;",38298, 38433);

LT_execute(str);

nlsf.Iterate(100);

nlsf.Iterate(100);

nlsf.Fit(1);
}


2   L A T E S T    R E P L I E S    (Newest First)
5*10 Posted - 09/22/2005 : 03:25:19 AM
Hi easwar!

Thak you for the fast replie.
I sind the files to the tech support.

Greets 5*10

easwar Posted - 09/21/2005 : 2:52:05 PM
quote:

But if I run my Programm the results also have negative y-values. But if I run the implemented menu there are only positive values.



Hi,

By "negative values", do you mean the data has no negative peaks, but the fit curve does? By "implemented menu", do you mean using the Analysis->Fit Multipeaks->Lorentzian"?

The fit can be sensitive to initial parameter values and the initial values you are using may be significantly different than the ones used with the menu item..

Best may be to send one sample data to tech support and have them take a look. If you do so, please refer to this post so they can see your code.

Easwar
OriginLab



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