# Re: log POWER FFT Output - Samples flipped in frequency

**URL:** <https://www.ruby-forum.com/t/re-log-power-fft-output-samples-flipped-in-frequency/233980>\
**Category:** GNU Radio\
**Created:** [January 28, 2015, 10:05am UTC](https://www.ruby-forum.com/t/re-log-power-fft-output-samples-flipped-in-frequency/233980 "2015-01-28T10:05:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 28, 2015, 10:05am UTC](https://www.ruby-forum.com/t/re-log-power-fft-output-samples-flipped-in-frequency/233980/1 "2015-01-28T10:05:07Z")

</div>

Hello,

I guess it shouldn’t be very difficult to change in order to get the  
output  
is from -BW/2 to BW/2 instead of [DC BW/2 + -BW/2 DC].  
Should I modify my python flowgraph or my “log POWER FFT” hier block?

I just need to flip the samples and I guess there is a recommended way  
to  
do that. Can numpy.fft.fftshift() do the work?

Many thanks for you help,  
Jorge.

On Mon, 19 Jan 2015 08:46:22 -0500, Marcus D. Leech wrote:

That’s normal for FFTW-based FFTs (and a lot of others).

The output goes from:

DC to BW/2  
-BW/2 to DC

Where BW is your signal bandwidth.

---

<div class="post-metadata">

**Author:** ![jorgegetafe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@jorgegetafe](https://www.ruby-forum.com/u/jorgegetafe)\
**Post date:** [January 28, 2015, 2:29pm UTC](https://www.ruby-forum.com/t/re-log-power-fft-output-samples-flipped-in-frequency/233980/2 "2015-01-28T14:29:08Z")

</div>

On 01/28/2015 10:03 AM, Jorge G. wrote:

> I just need to flip the samples and I guess there is a recommended way  
> to do that. Can numpy.fft.fftshift() do the work?

Sure, just wrap that into a Python (sync) block. Make sure to operate on  
vectors of the correct length! Your itemsize should probably be  
fft-length x sizeof(complex).

M
