R
R
Roman Popov2021-04-13 00:29:44
Python
Roman Popov, 2021-04-13 00:29:44

How to properly do complex Fourier transform in python?

I have two arrays of 1024 values ​​from two ADCs (I and Q signals). I need to calculate both the signal frequency and the phase shift between these channels. Those. do a complex transformation. It should look something like this picture:
6074bb1db724d627681378.png
I'm going to use NumPy. But I can’t understand how I need to prepare arrays for complex FFT and which specific function from the library should I use for my case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
res2001, 2021-04-13
@Roman_Popov

Use numpy.fft.fft().
Can be used with real numbers, the conversion will still be complex.
If you really want everything to be complex - just add the zero imaginary part to your real numbers. This can be done for example by adding your real array with 0j.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question