[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
New Address!   --   Neue Adresse!
[Uni logo]


WHERENAN Source code in wherenan.pro

WHERENAN

Name
      WHERENAN
Purpose
      Find the indices of all IEEE NaN values in an array.
Explanation
      Find the positions of all values within an array that correspond to the
      IEEE NaN (not-a-number) special values.
      This routine is designed to be used on data which is in external data
      representation, not host representation.  Its purpose is to catch all
      NaN special values before converting (IEEE_TO_HOST) from external to
      host format, e.g. when reading a FITS file.
      To identify IEEE values in the *host* representation, one can use
          result = where(array NE array)
      If this notation seems too bizarre, then since V5.2 one can use the /NAN
      keyword to the FINITE function
          result = where( finite(array,/NAN) )
Calling Sequence
      Result = WHERENAN( ARRAY [, COUNT ] )
Input Parameters
      ARRAY   = Array to test against the IEEE NaN special values.  Must be
                of either floating point, double-precision, or complex type.
Output Parameters
      The result of the function is the indices of all values of ARRAY
      corresponding to the IEEE NaN specification, similar to the IDL WHERE
      function.
Optional Output
      COUNT   = Number of values found corresponding to IEEE NaN.
Side Effects
      If no NaN values are found, or if ARRAY is not of type float, double
      precision, or complex, then -1 is returned, and COUNT is set to 0.
Restrictions
      ARRAY must be of type float, double-precision, or complex.
Procedure
      The bit patterns of the numbers being tested are compared against the
      IEEE NaN standard.
Revision History
      William Thompson, Feb. 1992.
      William Thompson, Oct. 1992, fixed bug regarding order of bytes on VAX
              machines.
      Converted to IDL V5.0   W. Landsman   September 1997

Last modified by pro2html on 2001 November 11 at 04:44 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically