[fitsbits] Fwd: Re: Storing PDF and other graphics binary files in FITS {External} {External} {External}
jaffe
jaffe at strw.leidenuniv.nl
Thu Mar 26 11:03:46 EDT 2026
Peter-
I'll think about making the code robust enough for public distribution.
Several fitsbitsers have suggested distributing the plot files in a
wrapper together with the binary data, e.g. in a tar file, but I find
that this creates an administrative headache for the user when dealing
with potentially hundreds of sets of data+plots resulting from a survey
project. That's why I want to package them together in one file per
target with accompanying meta-data.
By analogy I could argue that there is no need for FITS binary tables
since all the tables could be tar-ed as separate files into an archive
along with the image. This is sort of what we did in the original AIPS
implementation using the auxiliary data tables it created during
reduction. Very 1980s.
Walter
-------- Original Message --------
Subject: Re: [fitsbits] Storing PDF and other graphics binary files in
FITS {External} {External}
Date: 2026-03-26 14:28
From: Peter Teuben via fitsbits <fitsbits at listmgr.nrao.edu>
To: fitsbits at listmgr.nrao.edu
Reply-To: Peter Teuben <teuben at umd.edu>
Hi Walter,
can you make one available on a public URL? Seems ideal for github.
Maybe also the magic of viewing this reverse process, I probably would
have made the datasets available in a zip (or tar) file, and have PDFs
and FITS files as separate files. This is what I do with LMT archive
data, which use dataverse as it storage engine.
- peter
On 3/26/26 10:13, jaffe via fitsbits wrote:
> I solved my own problem within the existing FITS standards, at least
> within the python matplotlib astropy environment. I generate plots
> using the matplotlib pdf backend, and convert them to low-level binary
> using the python io.IOByte package. I then put them into a FITS binary
> table as a 1-row, 1-column table containing a single large byte array.
>
> When I want to display the plot I reverse the process reading out the
> binary table, then send the binary .pdf data to a viewer either as a
> pipe or by storing to disk and spawning the viewer.
>
> Presumably equivalent methods can be developed in other programming
> environments.
>
> Walter
>
> -------- Original Message --------
> Subject: Storing PDF and other graphics binary files in FITS
> Date: 2026-03-15 16:25
> From: jaffe <jaffe at mail.strw.leidenuniv.nl>
> To: Fitsbits <fitsbits at listmgr.nrao.edu>
>
> For an interferometric application I am storing the binary data in the
> so-called OI-FITS convention of FITS. But on the side I am generating
> rather complicated graphics files for my users, in this case in PDF. I
> would like to store the .pdf file as a table in the same FITS file. Is
> there a conventional way of doing this? I could create a 1 row binary
> table with the entire PDF file as the single column, but this could be
> several megabytes and might bother some reading or writing routines.
>
> Is there any need to create a "GRAPHICS" extension to FITS?
>
> Walter
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.nrao.edu
> https://listmgr.nrao.edu/mailman/listinfo/fitsbits
_______________________________________________
fitsbits mailing list
fitsbits at listmgr.nrao.edu
https://listmgr.nrao.edu/mailman/listinfo/fitsbits
More information about the fitsbits
mailing list