0
$\begingroup$

I have some terahertz spectroscopy time series data, a reference set with 2048 data points taken every 0.0521 picoseconds, and the sample data set with 544 data points taken every 0.0781 picoseconds. I'm using Matlab to take a FFT of both sets, with zero padding on the sample set up to 2048 points, and I'm supposed to do a deconvolution on those transformed sets on a specific range of frequencies, but because the sampling rate is different for the two, these correspond to different starting points in the data sets, and the lengths won't match up either. When plotting the two DFTs, they only line up properly when accounting for the different sampling rates when spacing the frequency axis.

Is there something I'm doing wrong, or how should I do the deconvolution?

$\endgroup$
1
$\begingroup$

Resample your data to be close to the same rate. Note that the ratio between the time samples is 1.4990403.... if you resampled the 0.0781 data by a frequency ratio of 3/2, you would result with a time error of 0.000033 ps per cycle. From your sampling rate and block length you can determine how much of an impact this would have to see if that scale is sufficient: 0.0521/.000033 = 157.9 samples to slip $2 \pi$ radians. Resampling with higher ratios to support larger data block sizes: For instance 9369/6250 will get you to 1.49904 with a resulting time error of 3.07E-7 ps per cycle, with a block length of .0521/3.07E-7 = 169,650.6 to slip $2 \pi$ radians.

I have not tried what I am about to suggest next so my thought process could be flawed, but it seems that you could feasibly do the simpler 3/2 resampling ratio and compensate for the remaining frequency error with a quadratric phase versus frequency all pass function. This is because the residual frequency error is the error at the sampling rate, and the error at all frequencies will be in proportion of their frequency to the sampling rate (so a linear function over frequency). Phase is the integral of frequency versus time, but I am thinking of the possibility of a compensating quadratic phase (vs frequency) function to reduce the residual error. Note in this case the derivative of phase versus frequency is delay, so I believe that this would be similar to emulating a phase shift with a time delay; in that it will have the correct phase delay as anticipated at one frequency only, and then will have linear error (in phase) as you deviate from that frequency. By getting our frequencies close with the 3/2 resampling, and assuming sufficient points in the fft such that the frequency spacing is small I could see the possibility that a smaller overall error is achieved with such an approach. This needs to be pursued further mathematically or experimentally but is a thought. If you do anything along this lines sucessfully please share your results! (Or if anyone sees the flaw with this approach that makes it not feasible please illuminate and I will delete this 2nd paragraph). I did post this technique as an additional question: Compensate for residual resampling error with a quadratic phase vs frequency- possible?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.