[fitsbits] JSONFITS, a suggestion for rendering FITS files in an Internet standards friendly format

Joe Hourcle oneiros at grace.nascom.nasa.gov
Wed Sep 30 12:06:32 EDT 2015



On Tue, 29 Sep 2015, Brian McConnell wrote:

> Hello,
>
> Bill Pence suggested I post here. I'm working on a project to make
> FITS data more accessible to software developers who are not
> necessarily familiar with the format. Specifically, we're looking at
> ways to make SETI observational data available to third party
> developers who may be very knowledgeable about software engineering,
> digital signal processing, etc, but not field specific formats like
> this.

[trimmed]

> [
> {"TARGNAME":"foo","TELESCOP":"arecibo","BINDATA":base64encodedblobofdatagoeshere},{"TARGNAME":"bar","TELESCOP":"arecibo","BINDATA":morebase64encodeddata}
> ]

Just in case someone's already using the header 'BINDATA', it might make 
sense to use a tag name that's specifically *not* valid in a FITS header.

Also note that by doing this, you'll lose all comments in the cards.
You'll also have to decide what to do with 'COMMENT' and 'HISTORY' --
they might not make sense once you potentially lose the order that they
were presented in.  You'll also have to decide if they're handled as
arrays:

 	"COMMENT":["comment1","comment2","comment3"],

or some sort of deliminated string:

 	"COMMENT":"comment1\ncomment2\ncomment3",

Of course, the COMMENT cards might become completely useless once you 
strip out the order of the cards ... the only solution for that would be 
to use data structures that would be much more obnoxious to use:

 	[{"SIMPLE":"T"},{"DATE":"..."},{"COMMENT":"..."},{"COMMENT":"..."},{...},...]


-Joe

ps.  On a related note -- I was talking to someone a while back about how
      nice it would be to have a service that would allow you to request
      slices out of a remote FITS file ... I was thinking that it might be
      possible to do something with the cfitsio extended file name
      syntax[1], and have a CGI that would extract & return just the
      portion of the file asked for.  This could allow an archive to store
      cubes online, but users to just request individual images.

      [1] https://heasarc.gsfc.nasa.gov/docs/software/fitsio/filters.html



More information about the fitsbits mailing list