idlastro / STSDAS Image manipulation: SXGPAR

[Source code]

NAME
SXGPAR                           
PURPOSE
Obtain group parameter value in SDAS/FITS file
CALLING SEQUENCE
result = sxgpar( h, par, name, [ type, sbyte, nbytes] )
INPUTS
h - header returned by SXOPEN
par - parameter block returned by SXREAD or multiple
        parameter blocks stored in array of dimension
        greater than one.
name - parameter name (keyword PTYPEn) or integer
        parameter number.
OPTIONAL INPUT/OUTPUT
type - data type (if not supplied or null string, the
        header is searched for type,sbyte, and nbytes)
sbyte - starting byte in parameter block for data
nbytes - number of bytes in parameter block for data
OUTPUT
parameter value or value(s) returned as function value
SIDE EFFECTS
If an error occured then !err is set to -1
OPERATIONAL NOTES
Supplying type, sbyte and nbytes greatly decreases execution
time.  The best way to get the types is on the first call
pass undefined variables for the three parameters or set
type = ''.  The routine will then return their values for
use in subsequent calls.
METHOD
The parameter type for parameter n is obtained
from PDTYPEn keyword.  If not found then DATATYPE keyword
value is used.  If that is not found then BITPIX is
used.  BITPIX=8, byte; BITPIX=16 integer*2; BITPIX=32
integer*4.
HISTORY
version 1  D. Lindler  Oct. 86
version 2  D. Lindler Jan. 90  added ability to process
        multiple parameter blocks in single call
version 3  D. Lindler  (converted to New vaxidl)
pr 14 1991      JKF/ACC - fixed make_array datatypes(float/double)
Converted to IDL V5.0   W. Landsman   September 1997