![]() |
Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, GermanyNew Address! -- Neue Adresse! |
![]() |
WHERENAN
Find the indices of all IEEE NaN values in an array.
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) )
Result = WHERENAN( ARRAY [, COUNT ] )
ARRAY = Array to test against the IEEE NaN special values. Must be
of either floating point, double-precision, or complex type.
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.
COUNT = Number of values found corresponding to IEEE NaN.
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.
ARRAY must be of type float, double-precision, or complex.
The bit patterns of the numbers being tested are compared against the
IEEE NaN standard.
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
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]