(Oct 3 1998)

## Locate narrowband signals and set flags.The output from step 2 contains two average power spectra with time constants of about 0.2 and 1 second respectively. If one or a few points is well above the surrounding points, a narrowband signal is present at the frequency in question. The routine update_liminfo() in RXSUB1.C sets flags in the array liminfo[] to indicate which frequencies are disturbed by narrowband signals. The flags also tell by what factor the corresponding frequency in the transform has to be multiplied with in order to assure that the signal will fit in 16 bit when the back transformation is performed. In this way no saturation will occur, and therefore strong signals will be correctly processed. As a result polarisation information is retained, and strong signals are attenuated, not limited, which means that the keying will not be distorted and no artificial keying clicks are introduced.
## Split the floating point fourier transforms into two parts and convert to integersFor each frequency the fourier transforms generated in step 2 has 4 values. Real and imaginary parts for the two polarisations. These 4 values of the two complex fourier transforms are split into 8 values corresponding to two pairs of complex fourier transforms. The first pair contains the wideband noise, and all very weak signals. The second pair contains sine wave like components, and they are multiplied by the attenuation factors in liminfo[] for spectral lines needing it. The four parallell transforms are stored as 16 bit integer numbers.This routine is written in assembly. The C compiler calls a subroutine for each conversion from floating point to integer. By skipping this call (to __CHP) the result may differ by one bit, but the time goes down dramatically. The C code used about 5% of the total available time, but optimised assembly does the same job about 3 times faster (but the rounding differs by 1 bit which is no problem - a 1 bit error is deep down in the noise.)
## Bring the signal back to the time domainThe MMX instructions are ideally suited for performing parallell back transforms with 16 bit numerics. There are twice as many transforms to calculate as compared to the first step but the computations need only half the time because of the parallellism of the MMX arithmetics.The output of this routine is two pairs of complex time domain signals. One pair contains the noise pulses (if any) together with weak signals and background noise. The other contains the rest of the input signals. The routine also produces the total power vs time, which is the sum of the squares of the real and the imaginary parts of the first signal pair (4 terms in the sum of squares). The total power signal contains the noise pulses summed from the two polarisations. It is conveniently calculated in the last step of the back transform while the input data for this computation is still in the MMX register. |