Next: ADDITIONAL FEATURES
Up: ACCESSING HEADER INFORMATION
Previous: Reading header items
This example (taken from a complete program
hdrwrite.f
- see §
) shows how to write the value of a
header item to an image associated with the parameter 'OUT':
* Write the new header item.
CALL HDR_OUT( 'OUT', ' ', 'OBSERVER', 'The observer', [1]
: 'Fred Bloggs', ISTAT )
* Free the image.
CALL IMG_FREE( 'OUT', ISTAT ) [2]
The following notes refer to the numbered statements:
- 1.
- The call to HDR_OUT specifies the image by using its
parameter name - 'OUT' (argument 1). If you have not
previously accessed this image you will probably be prompted for its
file name at this point. If you have already accessed the image then
it should be either an output image or one accessed for modification,
as you cannot write items to images accessed by IMG_IN.
The 2nd, blank argument, indicates that an ``ordinary'' FITS header
item is to be written.
The 3rd argument ('OBSERVER') specifies the name of the header
item and the 4th argument 'The observer' is a comment
to store with the item.
The 5th argument ('Fred Bloggs') is the header item value.
- 2.
- The image is freed. If this wasn't done, the new header item
would be lost.
Next: ADDITIONAL FEATURES
Up: ACCESSING HEADER INFORMATION
Previous: Reading header items
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