- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am a newbie using the FFT, I have some question about the input and output data format using the FFT Functions.
Well, my input data y is real. After the transformation y contains not only real but also imaginary data. Is there a workaround ?
thx
I am a newbie using the FFT, I have some question about the input and output data format using the FFT Functions.
[cpp] DFTI_DESCRIPTOR *my_desc_handle; long status; status = DftiCreateDescriptor( &my_desc_handle, DFTI_SINGLE, DFTI_REAL, 1, N); status = DftiCommitDescriptor( my_desc_handle); status = DftiComputeForward( my_desc_handle, y); status = DftiFreeDescriptor( &my_desc_handle );[/cpp]
Well, my input data y is real. After the transformation y contains not only real but also imaginary data. Is there a workaround ?
thx
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It depends on what you need from the spectrum y. If you want to discard the phase and use the power, you should use the magnitude (sqrt(re^2+im^2)) of the y's complex numbers.
Alternatively, if you needa real-to-real transform, look into trigonometric transforms section of MKL Refernce Manual.
Dima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It depends on what you need from the spectrum y. If you want to discard the phase and use the power, you should use the magnitude (sqrt(re^2+im^2)) of the y's complex numbers.
Alternatively, if you needa real-to-real transform, look into trigonometric transforms section of MKL Reference Manual.
Dima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - sicb0161
Hi,
I am a newbie using the FFT, I have some question about the input and output data format using the FFT Functions.
Well, my input data y is real. After the transformation y contains not only real but also imaginary data. Is there a workaround ?
thx
I am a newbie using the FFT, I have some question about the input and output data format using the FFT Functions.
[cpp] DFTI_DESCRIPTOR *my_desc_handle;
long status;
status = DftiCreateDescriptor( &my_desc_handle, DFTI_SINGLE, DFTI_REAL, 1, N);
status = DftiCommitDescriptor( my_desc_handle);
status = DftiComputeForward( my_desc_handle, y);
status = DftiFreeDescriptor( &my_desc_handle );[/cpp]
Well, my input data y is real. After the transformation y contains not only real but also imaginary data. Is there a workaround ?
thx
if I recall correctly you need to use DFTISetValue and select (from many) options you need, say, something along the lines:
[cpp]! set packed format for output complex conjugate-symmetric datawhere ..... go for named constants. (for example DFTI_REAL_REAL)
status%flag=DFTISetValue(desc_handle, ....., .....)[/cpp]
Take a look at Named Constants and storage schemes. I believe you'll find many good examples on disk.
A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Dmitry Baksheev (Intel)
Hi,
It depends on what you need from the spectrum y. If you want to discard the phase and use the power, you should use the magnitude (sqrt(re^2+im^2)) of the y's complex numbers.
Alternatively, if you needa real-to-real transform, look into trigonometric transforms section of MKL Refernce Manual.
Dima
Hi, yes I could do so, but I only want to have the real part of y. After computing the FFT, y contains imaginary and real data. To be more precise :
[cpp]y = (real part) if i = even, (imag part) if i = odd.[/cpp]But y is only of length n , thus only containing half the data.
Thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right, for size=N real-to complex transform the y contains only N/2+1 complex values. The remaining values can be restored using conjugate-even symmetry of y: y[N-n]=conj(y).
Dima
Dima

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page