next up previous
Next: Full Type Specifications
Up: ARRAY COMPONENT TYPES
Previous: Numeric Types

Complex Values  

In addition to its numeric type, each NDF array component also has a logical complex value flag associated with it, which indicates whether it holds complex values. If so, then each pixel of that array is a complex number, with separate real and imaginary parts. Both parts share the same numeric type.

The complex value flag for an NDF's data component is established when the NDF is created and the variance component will normally adopt the same value by default, although both may subsequently be altered (see §[*]). In contrast, the quality component can never hold complex values, so its complex value flag remains set to .FALSE. and cannot be changed.

It is possible to determine whether an array component holds complex values by using the routine NDF_CMPLX. For instance:

      CALL NDF_CMPLX( INDF, 'Variance', CMPLX, STATUS )

would return a logical .TRUE. result via the CMPLX argument if the NDF's variance component held complex values. As with NDF_TYPE, a list of components may also be specified, in which case the logical ``OR'' of the results for each component will be returned. Thus:

      CALL NDF_CMPLX( INDF, 'Data,Variance', CMPLX, STATUS )

will return a .TRUE. result if either the data or variance component holds complex values.



next up previous
Next: Full Type Specifications
Up: ARRAY COMPONENT TYPES
Previous: Numeric Types


Starlink User Note 33
R.F. Warren-Smith
11th January 2000
E-mail:rfws@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils