[fitsbits] Cutouts from compressed image binary tables {External}

Seaman, Robert Lewis - (rseaman) rseaman at arizona.edu
Tue Oct 18 23:12:39 EDT 2022


Hi Dustin,

I can’t speak to nom-tam-fits support for what you want to do, but FITS tile compression is designed for this, eg: “Dividing the image into tiles before compression enables faster access to small sections of the image because only those tiles covering the area of interest need be uncompressed.” (https://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/docs/fpackguide.pdf)

See the discussion under ZTILEn in the FITS convention (https://fits.gsfc.nasa.gov/registry/tilecompression/tilecompression2.3.pdf) for the header keywords to sort it out. Either you or the library will then need to index from the table into the heap. By default, the tiles are row-by-row which makes the arithmetic easier. If there are constraints on the sub-images of interest such as location or size, the tiles can be tuned to optimize access.

Rob



On 10/18/22, 7:29 PM, "fitsbits" wrote:

I’m using the nom-tam-fits Java library to extract a sub image from a compressed image binary table.  Typically, the compressed image is decompressed and one can perform a normal extraction, but my service exists on the Cloud and needs to be able to cutout in a streaming manner.  Is there a way to look at the Header and know what row in the table (or which tile) that overlaps some range of pixels?  Alternatively, would I need to iterate the tiles to see if any of them overlap?

Many thanks,
Dustin
CADC

_______________________________________________
fitsbits mailing list
fitsbits at listmgr.nrao.edu
https://listmgr.nrao.edu/mailman/listinfo/fitsbits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20221019/089c0041/attachment.html>


More information about the fitsbits mailing list