idlastro / STSDAS Image manipulation: SXGINFO

[Source code]

NAME
SXGINFO
PURPOSE
Return information on all group parameters in an STSDAS header.
EXPLANATION
Return datatype, starting byte, and number bytes for all group
parameters in an STSDAS file.     Obtaining these values 
greatly speed up execution time in subsequent calls to SXGPAR.
CALLING SEQUENCE
sxginfo, h, par, 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.
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
The number of elements in type,sbyte and nbytes equals the total
number of group parameters.
METHOD
The parameter type for each parameter 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.
NOTES
For an example of the use of SXGINFO, see CONV_STSDAS
HISTORY
version 1  W. Landsman   Apr. 93
Converted to IDL V5.0   W. Landsman   September 1997
-----------------------------------------------------------
determine size of output result
output will be scalar
output will be vector
ength of parameter blocks
check remaining input parameters
get number of group parameters and size
et number of group parameters
Determine BITPIX and DATATYPE in case PSIZE or PDTYPE is undefined
umber of bits to skip
umber of bytes to skip