Closed rgiordan closed 9 years ago
I think it does indeed make sense to expose this FITSIO functionality in the high-level interface. How about adding a method read_header(hdu::HDU, ::Type{ASCIIString})
so that, e.g.,
raw_header = read_header(f[1], ASCIIString)
returns the header as a single string, rather than a FITSHeader
object?
Ideally, in the future a wcsprm
object could be constructed by passing any mapping-like object (e.g., Dict
or FITSHeader
) that contains WCS keywords. That's obviously a bit more work though.
Sounds good, let me try to put together a pull request.
I'm looking into getting WCS information out of FITS image files, and it seems like the preferred function to use is
wcspih
, which, inWCSLIB.jl
at least, requires a raw ASCII FITS header. I think this can only be accessed with the now privateLibcfitsio.fits_hdr2str
function.I think this could also be done with
wcsprm
, but I haven't been able to find clear enough documentation about exactly which header key values should go into which arguments to do this with confidence.Do you have thoughts about whether there is a better way to do this, or whether maybe the raw header string should be available to users for this reason?