The good news: I have pushed to the branch an implementation that makes a binary2 format that passes STILTS votlint, and is read by Firefly.
The bad news: the code is converting the table several times in order to make this work, which doubles or triples the time required. We are running into limitations and performance problems with votable support in Astropy.
Here are the conversions that make this work:
- Convert afwTable.SourceCatalog to astropy.table.Table. This is LSST code and it is fast.
- Make a VOTable from the Astropy table. Fast.
- Write this first VOTable file out in tabledata format and read it back in as an intermediate VOTable. This is slow.
- Convert the VOTable file to Astropy table, make a copy, and convert back to VOTable. Fast.
- Write out the final VOTable in binary2 format. This is slow.
Surely there is a way to construct the VOTable the first time around, with all the right datatypes for the binary2 format to work. I have not figured that out yet. I think I need to set this aside for a couple of days and maybe find some other sources of help.
Here are some numbers pertaining to the motivation fo this work.
File sizes for the full footprints table:
The Firefly server on my laptop uploads the tabledata file in 26 sec, and the binary2 file in 6.2 seconds. The gzipped files do not upload.