sethead

This is a very useful wcstools routine that can edit a FITS header using the command line. You can also install a completely new FITS keyword. In the simple example below, I add a filter name (using the McDonald name "INSFILTE" to a file named a.fits. The edited version is ae.fits. I then use another useful wcstools task called "imhead" to show the results of this command.


% sethead -nvk insfilte="B" a.fits

% 
% imhead a.fits 
SIMPLE  =                    T
BITPIX  =                  -32
NAXIS   =                    2
NAXIS1  =                 1624
NAXIS2  =                 1234
EXTEND  =                    T
DATE    = '2014-10-09T06:55:39' / date and time of writing file
ORIGIN  = 'LTL FITS IO class, September 2010' / FITS file originator
EXPTIME =                30000
CCDTEMP =              -999.99
TARGTEMP=              -999.99
END

% imhead ae.fits 
SIMPLE  =                    T
BITPIX  =                  -32
NAXIS   =                    2
NAXIS1  =                 1624
NAXIS2  =                 1234
EXTEND  =                    T
DATE    = '2014-10-09T06:55:39' / date and time of writing file
ORIGIN  = 'LTL FITS IO class, September 2010' / FITS file originator
EXPTIME =                30000
CCDTEMP =              -999.99
TARGTEMP=              -999.99
INSFILTE= 'B       '
SETHEAD = 'SETHEAD WCSTools 3.8.7 2014-10-09T13:40 INSFILTE updated'




Practical Example 1: Installing filter cards.

Sometimes I want to add a filter header card. I used sethead to write a fairly easy script for this:


% filter_put 20141009T065153.5_cat_sci.fits B  

After this runs:
% imhead 20141009T065153.5_cat_sci.fits 
SIMPLE  =                    T
BITPIX  =                  -32
NAXIS   =                    2
NAXIS1  =                 1624
NAXIS2  =                 1234
EXTEND  =                    T
DATE    = '2014-10-09T06:51:38' / date and time of writing file
ORIGIN  = 'LTL FITS IO class, September 2010' / FITS file originator
EXPTIME =                30000
CCDTEMP =              -999.99
TARGTEMP=              -999.99
INSFILTE= 'B       '
SETHEAD = 'SETHEAD WCSTools 3.8.7 2014-10-09T14:09 INSFILTE updated'






Back to SCO CODES page