View Single Post
  #1  
Old September 24th 08, 06:08 PM posted to sci.astro.fits
Doug Mink
external usenet poster
 
Posts: 4
Default [fitsbits] moving headers.

Douglas S. Brenner wrote:
Hope I'm in the right place.

I have a fits file with the desired header in the first HDU test.fits[0]
and the data in the second test.fits[1]. I need to combine it into one
file that works in ds9. How do I do this?


My WCSTools package (http://tdc-www.harvard.edu/software/wcstools/) has
a lot of header manipulation tools. In this situation, you can take
advantage of the fact that most of its programs which deal with FITS images
automatically append the primary header to the header of any FITS extension
being looked at by itself. I put a -s option in the imrot program to split
multiextension files keeping the primary header information in each new
no-longer-an-extension file. You can use the -i option to keep that from
happening. There is also a cphead program which can copy selected keywords
from one FITS file header to another, with an option to copy all of the
WCS keywords.

-Doug Mink