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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 convolution integral
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jeortega

Spain
Posts

Posted - 11/06/2003 :  10:01:52 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I need advise to fit a data set by means of a convolution integral, i.e. a function:
f(E)= \int{g(E,E')h(E')dE'}

easwar

USA
1965 Posts

Posted - 11/06/2003 :  2:37:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

This article from our knowledge base describes how to fit using an integral. If you have more questions, please post.

http://www.originlab.com/www/support/resultstech.aspx?ID=121&language=English

Easwar
OriginLab.

Go to Top of Page

jeortega

Spain
Posts

Posted - 11/07/2003 :  09:21:16 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi, thanks for your help,

Two points:
1) I tested your fitting function but it fails if you increase the number of points up to 300. Why?

2) I do not see how yor formula can be applied to my case. If I understand correctly, your formula stands for this problem:

f(E)= \int{g(E)dE},

which is different from the "convolution", where you have two variables inside the integral

f(E)= \int{g(E,E')f(E')dE'}

Actually, Origin does have the gaussian-Lorentzian convolution in the "Voigt" built-in function (gaussian is f(E') and lorentzian g(E,E'). I wonder whether I could do the same but with my own g(e,e') and f(E').

Thanks again

Enrique
Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/07/2003 :  1:50:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Enrique,

1> I tried with 300 points and it worked fine. It took longer of course. I tried in version 7SR4
2> My apologies for not reading your post more closely. You can also perform convolution while fitting using the FFT object. Please see this OPJ to see how to do that:
http://www.OriginLab.com/ftp/forum_and_kbase/files/FittingWithConvolutionUsingScript.zip

You can then combine the script in this OPJ with the article on integration while fitting to perform what you want.

Easwar
OriginLab.

Go to Top of Page

jeortega

Spain
Posts

Posted - 11/10/2003 :  09:35:35 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

Hi,

Many thanks again, your answer can solve part of my problem...

...but, I apologize I am not giving enough detail.

Your method is directly valid for the following problem

f(y)= \int{L(x-y)*g(x)*dx}

How would you generalize to the following one (which is actually my problem)?

f(y)= \int{L(z(x)-y)*g(x)*dx}

where L=lorentzian and g=gaussian

Thank you and bye

Enrique
Go to Top of Page

jeortega

Spain
Posts

Posted - 11/10/2003 :  10:12:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I forgot,

Following previous message, you might think about performing a change of variable

z(x)=t

but then your response function (g(x)=gaussian) is not symmetric, and hence you do not meet the requirements of the FFT convolution.

Regards, Enrique
Go to Top of Page

easwar

USA
1965 Posts

Posted - 11/10/2003 :  10:52:45 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Enrique,

What you are looking for is beyond what you can do with simple scripting in the fitting function. However, you can call custom code from within NLSF by either using (a) Origin C and NAG - NAG library has convolution function that does not have symmetry requirement for response function etc (b) using external DLL developed using VC.

Note that for (a), you need version 7.0 or higher.

Easwar
OriginLab.


Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000