next up previous 78
Next: Complex filters and data smoothing
Up: FFT
Previous: Extracting the real and imaginary parts


Operations on complex data

There isn't a great deal of point in just transforming data back and forth, unless it's to get a feel for the errors introduced by such a process. Usually one transforms into the Fourier domain in order to do something useful there. The obvious Fourier domain operations are multiplication (equivalent to a convolution operation in normal space), and multiplication by the complex conjugate (equivalent to a cross correlation in normal space).

Figaro provides a number of functions that operate on complex data to provide a complex result. The operations performed by these should be fairly obvious from their names: `cmplxmult', `cmplxdiv', `cmplxadd', `cmplxsub', and `cmplxconj'. The most useful will probably be `cmplxconj', which produces the complex conjugate of a complex data structure, and `cmplxmult', which performs the complex multiplication of two complex data structures.

For example, the cross-correlation function of two spectra may be determined crudely by transforming each, taking the complex conjugate of one, multiplying the two and transforming back. This is crude, because it omits any filtering and preparation of the data, but it will serve as a demonstration of the complex operations involved. If the two spectra in question are `spect1' and `spect2', then

   ICL> r2cmplx spect1 cspect1
   ICL> r2cmplx spect2 cspect2
   ICL> fft cspect1 cspect1
   ICL> fft cspect2 cspect2
   ICL> cmplxconj cspect2 cspect2
   ICL> cmplxmult cspect1 cspect2 cspect1
   ICL> bfft cspect1 cspect1
   ICL> cmplx2r cspect1 corrln

will produce a cross correlation function in `corrln'.



next up previous 78
Next: Complex filters and data smoothing
Up: FFT
Previous: Extracting the real and imaginary parts

FIGARO A general data reduction system
Starlink User Note 86
Keith Shortridge, Horst Meyerdierks,
Malcolm Currie, Martin Clayton, Jon Lockley,
Anne Charles, Clive Davenhall,
Mark Taylor, Tim Ash, Tim Wilkins, Dave Axon,
John Palmer, Anthony Holloway and
Vito Graffagnino
2004 February 17
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council