### NDF_MAP

#### Description:

The routine obtains mapped access to an array component of an NDF, returning a pointer to the mapped values and a count of the number of elements mapped.

#### Invocation

CALL NDF_MAP( INDF, COMP, TYPE, MMOD, PNTR, EL, STATUS )

#### Arguments

NDF identifier.
##### COMP = CHARACTER $\ast$ ( $\ast$ ) (Given)
Name of the NDF array component to be mapped: ’DATA’, ’QUALITY’ or ’VARIANCE’ (or ’ERROR’).
##### TYPE = CHARACTER $\ast$ ( $\ast$ ) (Given)
Numeric type to be used for access (e.g. ’_REAL’).
##### MMOD = CHARACTER $\ast$ ( $\ast$ ) (Given)
Mapping mode for access to the array: ’READ’, ’UPDATE’ or ’WRITE’, with an optional initialisation mode ’/BAD’ or ’/ZERO’ appended.
##### PNTR( $\ast$ ) = INTEGER (Returned)
Pointer(s) to the mapped values (see the Notes section).
##### EL = INTEGER (Returned)
Number of elements mapped.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• A comma-separated list of component names may also be given, in which case the routine will map all the requested components using the same data type and mapping mode. Pointers to the values of these mapped components will be returned (in the specified order) in the elements of the array PNTR, which must be of sufficient size to accommodate them.

• The result of mapping the QUALITY component with a data type other than ’_UBYTE’ is not defined and should not be used.

• If the array is stored in scaled form, then the mapped values will be the result of applying the approproate scale and zero terms to the elements of the underlying array.

• If the array is stored in delta compressed form, then the mapped values will be the original uncompressed values.

• Scaled and delta arrays are read-only. An error will be reported if the array is stored in scaled or delta form and the access mode is update or write.

• If the MMOD argument includes the ’/ZERO’ option, the bad pixel flag for the array will be reset to false to indicate that there are no bad values present in the array (see NDF_BAD). If any bad values are then placed into the mapped array, NDF_SBAD should normally be called to set the bad pixel flag true. If this is not done, the bad values in the array may be treated as literal values by subsequent applications.

• If this routine is called with STATUS set, then a value of 1 will be returned for the EL argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason.