- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
링크가 복사됨
5 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
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