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
 Origin Forum
 Split Pseudo-Voigt Function

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
tayyeeyan Posted - 01/08/2008 : 05:09:08 AM
Hi, I would like to know how do i implement Split Pseudo-Voigt Function in the Advanced Fitting Tool? Is the c-code builder in the Advanced Fitting tool the best method to implement.

i have this code

if (x<xc)

q1 = A * ( mu * (2/PI) * (w1 / (4*(x-xc)^2 + w1^2)) + (1 - mu) * (sqrt(4*ln(2)) / (sqrt(PI) * w1)) * exp(-(4*ln(2)/w1^2)*(x-xc)^2) );

else

q2 = A * ( mu * (2/PI) * (w2 / (4*(x-xc)^2 + w2^2)) + (1 - mu) * (sqrt(4*ln(2)) / (sqrt(PI) * w2)) * exp(-(4*ln(2)/w2^2)*(x-xc)^2) );


b = ((2/PI)+(1/w1)*(sqrt(4*ln(2))))/((2/PI)+(1/w2)*(sqrt(4*ln(2))));

y = y0 + 2*(q1 + b*q2)/(1+b);

but somehow like q1, q2, b not not direct variables.
4   L A T E S T    R E P L I E S    (Newest First)
Chris D Posted - 05/19/2016 : 10:49:29 AM
Hi kaufparkangucker,

Can you send an email to tech@originlab.com with these details along with a small sample dataset for us to test with?

And please include your Origin version and serial number in the email.

Thanks,
Chris Drozdowski
Originlab Technical Support
kaufparkangucker Posted - 05/19/2016 : 10:01:49 AM
Hi Origin Community,

I found this topic because I was searching for Split Pseudo Voigt function type 2. So I coppied the code from lary and adapt the both first formulas to Psd-Voigt2 like that:

double q1, q2, b;
if (x<xc)
q1 = A * ( mu * (2/PI) * (wL1 / (4*(x-xc)^2 + wL1^2)) + (1 - mu) * (sqrt(4*ln(2)) / (sqrt(PI) * wG1)) * exp(-(4*ln(2)/wG1^2)*(x-xc)^2) );
else
q2 = A * ( mu * (2/PI) * (wL2 / (4*(x-xc)^2 + wL2^2)) + (1 - mu) * (sqrt(4*ln(2)) / (sqrt(PI) * wG2)) * exp(-(4*ln(2)/wG2^2)*(x-xc)^2) );

But I do not understand how to adapt b = ... and y = ... für Psd-Voigt 2 (wL1, wG1 and wL2, wG2 should be in this formula).

b = ((2/PI)+(1/w1)*(sqrt(4*ln(2))))/((2/PI)+(1/w2)*(sqrt(4*ln(2))));
y = y0 + 2*(q1 + b*q2)/(1+b);

Thanks for help.

Kauf
tayyeeyan Posted - 01/21/2008 : 11:50:42 AM
sorry for the late reply. Larry, thanks your help! It works now!
larry_lan Posted - 01/10/2008 : 01:18:36 AM
Hi,

You can define an Origin C fitting function, if you are using Origin 7.5.

The function parameters are: y0, A, mu, w1, w2, xc

And the function body is:


double q1, q2, b;
if (x<xc)
q1 = A * ( mu * (2/PI) * (w1 / (4*(x-xc)^2 + w1^2)) + (1 - mu) * (sqrt(4*ln(2)) / (sqrt(PI) * w1)) * exp(-(4*ln(2)/w1^2)*(x-xc)^2) );
else
q2 = A * ( mu * (2/PI) * (w2 / (4*(x-xc)^2 + w2^2)) + (1 - mu) * (sqrt(4*ln(2)) / (sqrt(PI) * w2)) * exp(-(4*ln(2)/w2^2)*(x-xc)^2) );
b = ((2/PI)+(1/w1)*(sqrt(4*ln(2))))/((2/PI)+(1/w2)*(sqrt(4*ln(2))));
y = y0 + 2*(q1 + b*q2)/(1+b);


Thanks
Larry
OriginLab Technical Services

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