I'm working on an app to process Distributed Acoustic Sensing (DAS) data from oil wellbores. This data comes in a massive H5 format matrix. The columns represent channels or sensing positions in the fiber, the rows are the time series of the sensing recorded at a certain rate, and the values indicate a phase shift at that channel and time (like -30212, for example). My main goal is to create a heatmap showing frequencies on the X-axis and depth (channels) on the Y-axis, similar to the figure shown.

frequencies vs depth

Here's the process I'm following:

  1. For each channel, I'm averaging over an FFT (Fast Fourier Transform) size of the column. I slice the column into sections of the FFT size, overlap them by a certain percentage (like 50%), and then average these slices index by index. This gives me an array representing the column. AKA Time averaging.
  2. I apply a windowing function to this array (like the Hann window).
  3. I use a library to perform the FFT on this windowed array.
  4. From this, I extract the magnitudes and bins.
  5. I calculate normalized power as (magnitude^2)/(frequency resolution).

Finally, I convert this power into decibels (dB) using:

 finalPower = 10 * Math.log10(currentPower);

My issue is that the results I'm getting are oddly symmetrical across channels, which isn't what I expected. I'm stumped on what's going wrong.

enter image description here

If you can point me in the right direction and give me some good documents to learn from, I'd much appreciate it. Thank you so much.

  • 1
    $\begingroup$ FFT produces a symmetric output magnitude. However, it should be through-the-channels (intra-channel), not accross them (inter-channel)? If you have perfect symmetry accross-the-channels, then may be you have mixed the columns vs rows...? Try transposing the input, to see if cross-channel symmetry is gone. And then, you can trim half of the FFT output sequence to the get rid of the remaining intra-channel symmetry. $\endgroup$
    – Fat32
    Commented Dec 11, 2023 at 3:24
  • $\begingroup$ No, I have triple-checked the data and the process. I'm sending the expected slices to the FFT. You're right about the symmetric output, but you are also right, I mean that for each channel I got almost the same result. $\endgroup$ Commented Dec 11, 2023 at 10:22
  • $\begingroup$ Your first step is time domain averaging which, will act as a low pass filter. Are you sure that's the right thing to do for your application? If you want to estimate the power spectrum, you average in energy in the frequency domain. This preservers the general spectral shape $\endgroup$
    – Hilmar
    Commented Dec 11, 2023 at 10:36
  • $\begingroup$ Hi Hilmar, my signal is pretty stationary in time, so I think this is a good approach. $\endgroup$ Commented Dec 11, 2023 at 12:56

1 Answer 1


It seems like you are attempting to implement Welch's method, but you have some of the steps out of order. Welch's method is an extension of Bartlett's method to allow for windowing and overlap in the time domain (see Matlab pwelch or scipy.signal.welch).

As another user noted, simple time domain averaging is a crude low-pass filter (think of a moving average filter). The sequence order you are using is segmenting, averaging, windowing, FFT, power calculation. The correct order you are probably looking for would be segmenting, windowing, FFT, power calculation, averaging.

The idea of averaging in the frequency domain is that the noise in the spectrum from segment to segment would be uncorrelated and zero mean, so averaging in the frequency domain will reduce the noise variance, but at a cost of resolution. Noise in a power spectrum won't be zero mean as PSDs are real, non-negative valued, but the same principle applies.

If you are strictly wanting to stick with time-averaging, then you would have to do something like time averaging when forming a correlation matrix to perform a different spectral estimate. Time averaging in this case becomes a statistical estimate instead of a lowpass filtering operation. You could then use other PSD techniques like Capon or MUSIC, but these are typically more computationally expensive.

  • $\begingroup$ Hi, I'm going to read about everything you said, I have no clue honestly. Thank you. $\endgroup$ Commented Dec 11, 2023 at 19:15
  • $\begingroup$ Happy to help! Let me know if you have any more questions! $\endgroup$
    – Baddioes
    Commented Dec 11, 2023 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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