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
 Forum for Origin C
 numeric FFT for data evaluation - Need help
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

mawo

Germany
Posts

Posted - 03/07/2010 :  10:17:24 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi @ll,
i´m stuck with origin c and hopefully somebody can help. Im currently writing my phd thesis and encountered a problem with data evaluation that has to be solved. Unfortunatly I can´t do it and within my workgroup nobody can help me. Anyways it has to be done..

---

Currently I´m fitting pre-fourier transformed (with another program) autocorrelation data with a spectral function S(q,T,omega). (see code snippet 1 if you are interested).

For a more reliable evaluation I should do the following:
1.) calculate the numeric fourier transformed S(q,T,omega) (which is the autocorrelation function c(q,T,t) following the wiener-kientchine theorem) using literature values for all variables used within S(q,T,omega) but with q,T as input and omega as independent variable. (0 < omega < 100000).

2.) fit the experimental data with the result of 1.):
y = A*B*c(q,T,t)+A*c(q,T,t)^2

(this is related to homodyne and heterodyne contribution to the autocorrelation function)

Summary: I need to know how to let Origin first calculate S(q,T,omega) than apply inverse fourier transform to it. Afterwards fit my data with the modified result c^2 and c for hetero/homodyne contribution.

If anybody could help me with maybe support me with the code needed - you will be mentioned in caps in my thesis ackknowledgement.


code snippet 1
#include <origin.h>

double f(double x, double k, double eta, double T, double sigma)
{
	double rho=(1.219-7.17E-4*(T-273.16))*1000;
	double nu = eta/rho;
	double epsilon = nu*k^2;
	double omegas = sqrt(9.81*k+sigma*k^3/rho);

	complex D1 = omegas^2-(x+2*1i*epsilon)^2-4*epsilon^2*(1-1i*x/epsilon)^(1/2);
	return -2/x*k/rho*Im(D1)/cabs(D1)^2;
}
//---Here´s the non editable part...
{
	// Beginning of editable part
	y = A*f(x, k, eta, T, sigma);

}

Penn

China
644 Posts

Posted - 03/08/2010 :  01:12:37 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

From your description, I am not very sure what you exactly want. However, in Origin 8 (or higher version), you can use X-Function fft1, ifft1, fft2, and ifft2 to perform FFT and inverse FFT. To do non-linear fitting, please refer to this chapter. The user-defined fitting function is supported too. You can refer to this page for more information about how to define a fitting function.

Penn
OriginLab Technical Services
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