In most cases, one starts with an `ordinary' (i.e. non-complex) file and wants to produce a complex structure in which this is the real part of the complex data and the imaginary part is zero. This is what the command `r2cmplx' does. For example,
ICL> r2cmplx myspect cmplxspect
will generate a complex structure with the real part taken from `myspect', and the imaginary part will be set to zero.
In some cases, you may want to set the imaginary part of a complex structure as well as the real part. In this case, you can use `i2cmplx', which takes the data from a non-complex structure and uses it to set the imaginary part of an existing complex structure. This means that the complex structure has to be created initially by `r2cmplx', and then the imaginary part can be set by `i2cmplx'. So, if you have two spectra called `rspect' and `ispect' which you want to be the real and imaginary parts of a complex spectrum, the sequence is
ICL> r2cmplx rspect cmplxspect ICL> i2cmplx ispect cmplxspect
and the order of operations is important; doing the `i2cmplx' step first will produce a quite different result: the `i2cmplx' will fail, unless it so happens that `cmplxspect' already exists, and even if it succeeds the `r2cmplx' will just produce a new version with a zero imaginary array.
There is no procedure supplied to create a complex structure with the imaginary data taken from a specified file, say `ispect', but with the real part set to zero. It was thought that this would be an unusual requirement. If needed, the following sequence may be used:
ICL> icmult ispect 0 scrap ICL> r2cmplx scrap cmplxspect ICL> i2cmplx ispect cmplxspect
FIGARO A general data reduction system