[AstroPy] Re: HIERARCH
Jin-chung Hsu
hsu at stsci.edu
Wed Mar 30 16:15:05 EST 2005
Joe Harrington wrote:
>> It will not be initially as the underlying PyFITS code does not
>> support HIERARCH yet.
>>
>
>
> It's not hard to support extracting the values of individual HIERARCH
> keywords, and it's a very valuable thing to do since there are now a
> lot of data that use them. I just implemented it for IDL's sxpar
> using regular expressions in a couple of hours. I've included a
> patch, just for illustrative purposes, so you can see how I cased it
> in the regex. The full routine is here if you care:
> http://oobleck.astro.cornell.edu/pub/sxpar.pro
>
> Getting the whole hierarchy in some reasonable structure is more of a
> stunt, and less useful. People care about the individual values.
>
> --jh--
>
>
Thank you for the quick reply. I agree that it is not a big deal if
just reading the value.
But, if I want to support it fully, I also need to be able to write it,
index it etc. in PyFITS.
The way the keywords are now implemented in PyFITS is pretty involved
because of efficiency issue (minimal parsing by using a keyword list).
Also what if people combine it with the complicted case of CONTINUE
cards? These are the reasons I hesitate to support it fully in PyFITS.
It is possible to support it in getval(), but that looks funny if PyFITS
itself does not.
JC Hsu
More information about the AstroPy
mailing list