NAME
power_spec -- computes (power) spectrum of FFT data
PROTOTYPE
unitptr power_spec( int iDx, int iDy, int iType, unitptr uHost)
ARGUMENTS
- int iDx
- Width of FFT data
- int iDy
- Height of FFT data
- int iType
- Type of operation
- unitptr uHost
- Host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
INTERFACE OF CREATED UNIT:
- X_in[2*iDx*iDy]:
- (packed input field 0) complex input data
- X_out[iDx*iDy]:
- (packed output field 0) real output data
DESCRIPTION:
Well, this units actually computes the spectrum, i.e. the absolute value
of the complex input data. It is mainly intended for visualization issues
only. Depending on the value of iType the following postprocessing operation
is executed:
- iType = 0
- just compute spectrum (absolute value)
- iType = 1
- spectrum scaled to interval [0...255]
- iType = 2
- logarithm of spectrum scaled to values between 0 and 255
STATUS:
preliminary
FILE
nst_fft2d.cc