[fitsbits] (no subject)
LC's No-Spam Newsreading account
nospam at mi.iasf.cnr.it
Fri May 13 13:01:21 EDT 2005
I open a separate thread.
On Fri, 13 May 2005, Mark Calabretta wrote:
> While we're counting bits, I note that the precision of keyvalue data
> types is essentially undefined. [...]
>
> PSRTIME = 88402115102000 / [us] Time since T0
> PULSENO = 9465023873 / Pulsar pulse number since T0
It is true that header keyword are not strongly typed. That's somehow a
flaw of FITS as working format (in fact I've used for some applications
a format of my own in which header keywords were stored as binary data,
or binary data arrays (arrays of keywords are another thing I miss),
with :
- a 8-character FITS-compliant name
- a 1-byte type specification
- a 1-byte length word (number of items in number or array or string
length)
- n binary values of appropriate type, where the types I supported were
INTEGER*4, REAL*4, REAL*8 and CHARACTER*n. I supported arrays up to
255 elements, and strings up to 69 characters (this latter limit to
be FITS compliant !)
If a keyword is typed, the application program can query the type,
and/or store the entire header in a memory buffer (the way I used in
Fortran) a data structure (the way I decoded my files into IDL)
Since FITS keywords are not strongly typed, the burden of reading them
into a variable of appropriate type is left to the application writer.
I do not see any easy way of changing this in the "once FITS forever
FITS" rule.
Lucio Chiappetti
--
----------------------------------------------------------------------
nospam at mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
More information about the fitsbits
mailing list