next up previous 405
Next: Accessing other objects
Up: FITS Headers
Previous: Reading a FITS header value

Writing or modifying a FITS header value

We can also write new headers at specified locations (the default being just before the END card), or revise the value and/or comment of existing headers. As we know the header AIRMASS exists in image123, the following revises the value and comment of the AIRMASS header. It also writes a new header called FILTER immediately preceding the AIRMASS card assigning it value B and comment Waveband.

     fitswrite image123 airmass value=1.062 comment=\"Corrected airmass\"
     fitswrite image123 filter position=airmass value=B comment=Waveband

As we want the metacharacters " to be treated literally, each is preceded by a backslash.


next up previous 405
Next: Accessing other objects
Up: FITS Headers
Previous: Reading a FITS header value

C-shell Cookbook
Starlink Cookbook 4
Malcolm J. Currie
2006 November 26
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council