Next: HDR_OUT[x]- Write a header item
Up: HDR Fortran subroutines
Previous: HDR_NAME- Return a header item name
HDR_NUMB- Return a header item count
- Description:
- This subroutine returns the number of header items or the number
of occurrences of a specific item. The numbers returned can be
used as limits when indexing using HDR_NAME or when
deleting/reading items with more than one occurrence (such as
FITS 'HISTORY' or 'COMMENTS') or to test the existence of
an item.
- Invocation:
- CALL HDR_NUMB( PARAM, XNAME, ITEM, N, STATUS )
- Arguments:
-
-
PARAM = CHARACTER * ( * ) (Given)
-
Parameter name of the image (case insensitive).
-
XNAME = CHARACTER * ( * ) (Given)
-
Source of the header information
('FITS' or ' ' for FITS headers).
-
ITEM = CHARACTER * ( * ) (Given)
-
The name of an item or '*'. If this is '*' then a
count of all the items is returned, otherwise the
number of occurrences of the named item is returned.
-
N = INTEGER (Returned)
-
The number of header items or occurrences of an item.
-
STATUS = INTEGER (Given and Returned)
-
The global status.
- Notes:
- This subroutine will directly access an image if an
association has not already been made. Note that it will be
opened for read-only access and you will not be able to write
or delete any header items. If you need to be able to do this
then access the image first, either with one of the
IMG_MOD[n][x] subroutines
(if you intend to process the image data), or the
HDR_MOD subroutine.
- This subroutine may be used to query the number of items or
occurrences of an item in the same source of more than one
image dataset at a time by using multiple parameter names.
Multiple parameter names are provided as a comma separated list
(i.e. 'IN1,IN2,IN3'). The source must exist in all images and
the argument N will be returned as the maximum number of header
items or occurrences located (from each source).
- If the number of header items is zero then this will be
returned, no error will be reported.
- The number of occurrences of an item will usually be 1, except
for the special FITS items 'COMMENT', 'HISTORY' and
' '. This ability is therefore most useful for testing the
existence of items (0 is returned if an item isn't found) or
for manipulation of the occurrences of the special FITS items.
Next: HDR_OUT[x]- Write a header item
Up: HDR Fortran subroutines
Previous: HDR_NAME- Return a header item name
IMG Simple Image Data Access
Starlink User Note 160
P.W. Draper
R.F. Warren-Smith
3 March 2003
E-mail:P.W.Draper@durham.ac.uk
Copyright © 2000-2003 Council for the Central Laboratory of the Research Councils