# Y-axis unit of FFT

**URL:** <https://root-forum.cern.ch/t/y-axis-unit-of-fft/52132>\
**Category:** Newbie\
**Created:** [October 28, 2022, 7:04am UTC](https://root-forum.cern.ch/t/y-axis-unit-of-fft/52132 "2022-10-28T07:04:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FELICIA\_SUTANTO](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/felicia_sutanto/32/31311_2.png) [@FELICIA\_SUTANTO](https://root-forum.cern.ch/u/FELICIA_SUTANTO)\
**Post date:** [October 28, 2022, 7:04am UTC](https://root-forum.cern.ch/t/y-axis-unit-of-fft/52132/1 "2022-10-28T07:04:24Z")

</div>

Consider the following code:  
TVirtualFFT::SetTransform(0);  
TH1F \*hm = h-\>FFT(hm, “MAG”);  
where h is the original signal with Y-axis unit XXX.

Does the Y-axis unit of hm remain the same as h (i.e., XXX as well)? or is there a scaling factor being applied?

---

<div class="post-metadata">

**Author:** ![moneta](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/moneta/32/19423_2.png) [@moneta](https://root-forum.cern.ch/u/moneta)\
**Post date:** [October 28, 2022, 8:26am UTC](https://root-forum.cern.ch/t/y-axis-unit-of-fft/52132/2 "2022-10-28T08:26:28Z")

</div>

Hi,

No the Y axis of the returned histogram is the Magnitude = `sqrt(real^2 + im^2)` of the FFT output of the transformation. You can also have the real or the imaginary part as output. See the [`TH1::FFT` documentation](https://root.cern.ch/doc/master/classTH1.html#a69321e3106e4a26db3fef4d126d835ff)

Lorenzo

---

<div class="post-metadata">

**Author:** ![FELICIA\_SUTANTO](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/felicia_sutanto/32/31311_2.png) [@FELICIA\_SUTANTO](https://root-forum.cern.ch/u/FELICIA_SUTANTO)\
**Post date:** [October 28, 2022, 4:42pm UTC](https://root-forum.cern.ch/t/y-axis-unit-of-fft/52132/3 "2022-10-28T16:42:14Z")

</div>

I see. Thanks for replying, Lorenzo!  
To make sure, this means the unit of the magnitude of the transform is identical to the unit of the original signal?
