Determine if an NDF array component may contain bad pixels

#### Description:

The routine returns a logical value indicating whether an array component of an NDF may contain bad pixels for which checks must be made when the array’s values are processed. Only if the returned value is .FALSE. can such checks be omitted. If the CHECK argument to this routine is set .TRUE., then it will also perform an explicit check (if necessary) to see whether bad pixels are actually present.

#### Arguments

NDF identifier.
##### COMP = CHARACTER $\ast$ ( $\ast$ ) (Given)
Name of the NDF array component: ’DATA’, ’QUALITY’ or ’VARIANCE’.
##### CHECK = LOGICAL (Given)
Whether to perform an explicit check to see whether bad pixels are actually present.
Whether it is necessary to check for bad pixels when processing the array’s values.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• A comma-separated list of component names may also be supplied, in which case the routine returns the logical "OR" of the results for each component.

• If CHECK is set .FALSE., then the returned value of BAD will indicate whether bad pixels might be present and should therefore be checked for during subsequent processing. However, even if BAD is returned .TRUE. in such circumstances, it is still possible that there may not actually be any bad pixels present (for instance, in an NDF section, the accessible region of an array component might happen to avoid all the bad pixels).

• If CHECK is set .TRUE., then an explicit check will be made, if necessary, to ensure that BAD is only returned .TRUE. if bad pixels are actually present.

• If a component is mapped for access through the identifier supplied, then the value of BAD will refer to the actual mapped values. It may differ from its original (unmapped) value if conversion errors occurred during the mapping process, if an initialisation option of ’/ZERO’ was specified for a component whose value was initially undefined, or if the mapped values have subsequently been modified.

• A BAD=.TRUE. result will be returned for any components which are in an undefined state, except in the case of the QUALITY component for which a .FALSE. result is always returned under these circumstances.