IFFT Problems

I have experimental data points as (x, y) co-ordinates. These are in the frequency domain and I want to transform them to the time domain. To do this I need to use the inverse Fourier transform. In Igor, I load my y-values as wave1 and execute the following:

SetScale /P x, 0.004836, 0.004836, wave1

matrixop/o wave2=cmplx(wave1,wave0)
Display wave2
Label bottom "w THz"
Label left "S(Q,w) THz"

//Plot IFFT

IFFT/R/DEST=wave3 wave2
Display wave3
Label bottom "Time (ps)"
Label left "Probability"

The setscale provides a plot that is the same as my experimental data. My data on the x axis is in THz and the y axis will be normalized using the wave arithmetic package after. As the data I have is real, I have made my experimental values a complex wave using a wave of zero’s (wave0) to be the coefficient of the imaginary term. Then computed the IFFT, expecting real output, giving what can be seen in attachment 1.

I have to then fit a stretched exponential over the range 0 to 0.6, this gives me a value for tau which is incorrect.

Doing the same method in Origin, my scale comes out differently, and the value for tau is correct. When I compare the two programs I have to scale the Igor x values up greatly and the shapes of the two plots are completely different. The comparison can be seen in the second attachment.

Can anyone see what I am doing wrong in Igor with my IFFT to get these strange values?

Help is greatly appreciated.
Thanks.
Graph1.pxp (11.23 KB) Comparison.doc (34 KB)
I think you're getting tripped up by wave scaling. Instead of the SetScale command you posted above, try this

SetScale /P x, 0.004836e12, 0.004836e12, "Hz", wave1


Then replace your MatrixOp command with this:

duplicate/o wave1, wave2
matrixop/o/S wave2=cmplx(wave1, 0)


Doing the duplicate first will put the appropriate wave scaling in wave2, and adding the /S flag to the MatrixOp call will keep the scaling. From there I think you should be ok.

With regards to the curve fit not giving the expected result, what result do you expect? What is the exact command you're using to get the curve fit. Keep in mind that if you're using the built in exp curve fitting function, one of the fit coefficients is inverse tau, not tau. If you want the fit function to give you tau directly, use the exp_Xoffset built in function. Actually, you should be using that in any case, as it is more reliable in certain cases where you have a large x offset.

If this still doesn't solve your problem please upload an experiment that contains your original wave1 and the steps in between, and keep the command history there so we can see what commands you used.
Thank you very much, that does solve my problems with the x scale.

I am expecting a tau of about 30ps, another person has done this in Origin and come out with that value and it matches up with the theoretical values. In Igor I have come out with around 6ps. But doing the IFFT in both programs gives different shapes.

I am fitting a stretched exponential to the IFFT using the curve fitting and creating a new fit function. I have three variables (f, tau, and beta). The function is:

f(t) = f*exp(-(t/tau)^beta)

I put in my initial guesses as tau=32, beta=0.6 and f=1. The f should be 1 as I have normalized the values from the IFFT.

I have attached an excel file with the experimental data and the points graphed from Igor and from Origin.

If you can see where I am going wrong doing this it would be very helpful.
Thank you for you time.
Sheet1.xls (58.5 KB)
Cheryl wrote:
The function is:

f(t) = f*exp(-(t/tau)^beta)

I put in my initial guesses as tau=32, beta=0.6 and f=1. The f should be 1 as I have normalized the values from the IFFT.


Out of curiosity, when you do the fitting in Igor and/or Origin, do you constrain (hold constant) any of the fit parameters? If so, do you do so consistently in both programs?

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
Cheryl-

Please send a copy of your Igor experiment file (the .pxp file) to support@wavemetrics.com. That will allow us to see what you've done in Igor.

I see that Adam told you to do

matrixop/o/S wave2=cmplx(wave1, 0)

But in your original post you had

matrixop/o/S wave2=cmplx(wave1, wave0)

What is wave0? Presumably the shape of the IFFT result would be different if it includes a non-zero imaginary part... :)

I am the curve fitting guy, but it doesn't look like the problem is with the fit. The fit is different because the data you're fitting is different. So we need to figure out what you did in Igor and what might be going wrong there.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
johnweeks wrote:

....

I am the curve fitting guy, but it doesn't look like the problem is with the fit. The fit is different because the data you're fitting is different. So we need to figure out what you did in Igor and what might be going wrong there.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com


Dear John,

I am having some problems using the iFFT command line in IGOR...

In the attachment you will find an IGOR file, with an intensity vs frequency plot; where intensity is the Wave1 and the frequency is the Wave0

I have used the iFFT command like you suggested to Cheryl in this post...

could you tell me how is the correct procedure???..

You need to note that the frequency axis include half positive and half negative values...

Thanks a lot,

regards...

PS: I just want to change the plot from S(I,w) to S(I,t)...


iFFT - test 1.pxp (38.29 KB)
lorenzoat wrote:
Dear John,

Well, the person who told Cheryl how to do the IFFT was Adam, not me, but...
Quote:
I am having some problems using the iFFT command line in IGOR...

In the attachment you will find an IGOR file, with an intensity vs frequency plot; where intensity is the Wave1 and the frequency is the Wave0

I have used the iFFT command like you suggested to Cheryl in this post...

could you tell me how is the correct procedure???..

The IFFT operation requires complex input data, and it expects the frequency information to be encoded using the X scaling of the input wave. It does not operate on XY pairs of waves. So to do the IFFT you need to do two things: set the X scaling and provide an imaginary part for the data. To set the X scaling:
SetScale/P x wave0[0], 0.4, wave1

This command sets the deltaX to 0.4. I figured that out from noting that the values in your wave1 are evenly spaced, with an increment of 0.4. It sets the x0 part of the X scaling from the first value in wave0.

Making the wave complex is not hard, but there is probably missing phase information that can't be reconstructed. The best I can do is set the imaginary part to zero using a command sequence like this:
Make/O/C/N=(numpnts(wave1)) wave1_c
wave1_c = cmplx(wave1, 0)

Now you can do the IFFT on the wave "wave1_c".
Quote:
You need to note that the frequency axis include half positive and half negative values...

Hm... it's been a long time since I did this kind of stuff, and I seem to have lost my copy of Bracewell's book... if you can't figure this out, perhaps AG will chime in.
The asymmetric shape with negative frequency as I recall implies a non-causal result. You may need to rotate the result you get from IFFT and possible patch up the time values.
Quote:
PS: I just want to change the plot from S(I,w) to S(I,t)...

This should get you at least part of the way there.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
lorenzoat wrote:



PS: I just want to change the plot from S(I,w) to S(I,t)...


Can you define what you mean by these symbols, i.e., what is 'S', what is 'I' and lets make sure we are not just guessing what you mean by 'w' and 't'.

A.G.
WaveMetrics, Inc.