[fitsbits] [Fwd: cfitisio/wcslib inheritance]

William Pence pence at milkyway.gsfc.nasa.gov
Thu Jun 1 13:38:09 EDT 2006


> Subject: cfitisio/wcslib inheritance
> Date: Thu, 25 May 2006 10:01:11 +0100
> From: Peter Bunclark <psb at ast.cam.ac.uk>
> Organization: University of Cambridge, England
> Newsgroups: sci.astro.fits
> 
> Is there a simple way to inherit the primary header when using
> fits_hdr2str and wcspih ?  The particular case being, EQUINOX and
> RADESYS are in the primary (which has NAXIS  = 0) and the rest
> of the WCS in the extesions of a MEF.
> 
> If I concatenate the strings from hdr2str for the primary and
> each extension, will wcspih skim past the initial dataless
> header?

Regardless of whether wcspih (in wcslib) will ignore the NAXIS = 0 keyword 
from the primary array, a more robust solution would be to use the 'exclist' 
parameter in the first call to fits_hdr2str (in CFITSIO) to exclude the 
NAXIS primary array keyword (and SIMPLE and BITPIX as well) from the output 
string.  Then concatenate the keyword string from the primary array onto the 
end of the keyword string from each extension.

Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                       pence at milkyway.gsfc.nasa.gov
NASA/GSFC Code 662       HEASARC        +1-301-286-4599 (voice)
Greenbelt MD 20771                      +1-301-286-1684 (fax)





More information about the fitsbits mailing list