IFFT Problems
Cheryl
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.
Then replace your MatrixOp command with this:
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.
March 9, 2010 at 05:29 pm - Permalink
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.
March 9, 2010 at 06:18 pm - Permalink
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
March 10, 2010 at 09:42 am - Permalink
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
March 10, 2010 at 09:46 am - Permalink
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)...
October 18, 2010 at 01:39 pm - Permalink
Well, the person who told Cheryl how to do the IFFT was Adam, not me, but...
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:
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:
wave1_c = cmplx(wave1, 0)
Now you can do the IFFT on the wave "wave1_c".
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.
This should get you at least part of the way there.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
October 18, 2010 at 03:38 pm - Permalink
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.
October 18, 2010 at 04:35 pm - Permalink