Fft

Hi,
I have a macro (attached) based on the ROOT tutorial.
I cant figure out the following:

  1. how to scale x-axis on the pad “Magnitude of the 1st transform”
    in order to have “real frequency”
  2. how to scale y-axis on the pad “Magnitude of the 1st transform”
    in order to have “real magnitude”
  3. I found that “frequency reconstruction” (“Magnitude of the 1st transform” hist)
    drastically depends on number of samples (n parameter in the macro) and
    range (upX). Could you recommend a procedure for their calculation.
  4. I see that magnitudes of frequencies are different (but they should be equal).
    How to correctly find/reconstruct magnitudes?

Thanks.

Regards. Valeriy
FFT1.C (8.48 KB)

Have you (or anybody else) found the answers to this questions? Now it is interesting for me too, I also do not know how to do points 1,2,3,4…