[fitsbits] byte offsets from CFITSIO

William Pence William.Pence at nasa.gov
Tue Dec 10 22:53:15 EST 2013


[It would be preferable to send any questions about CFITSIO directly to 
the HEASARC Ftools help desk at 
http://heasarc.gsfc.nasa.gov/cgi-bin/ftoolshelp or to my email address.]

Use the fits_get_hduaddr or fits_get_hduaddrll routine to get the byte 
offsets to the start of the current HDU, the start of the data within 
that HDU, and the end of the data in that HDU.

The length of each fixed-length row in a table is given by the NAXIS1 
keyword.

In the case of variable-length array columns, call fits_read_descript or 
fits_read_descriptll to get the descriptor value that gives the byte 
offset and array length of a particular VLA element.

-Bill Pence

On 12/10/2013 5:38 PM, Demitri Muna wrote:
> Hi,
>
> I would like to accomplish the following with CFITSIO:
>
> - get the byte offset from the start of the file to HDU x
> - get the byte offset for the start of data (image or table) for HDU x
> - if an HDU is a table, get the length in bytes for each row such that I
> can compute the byte offset from the start of the HDU (or table, or
> file) to each row in the table (is this possible given variable length
> rows?)
>
> Is this possible now, and if not, how can it be done?
>
> Cheers,
> Demitri
>
> _________________________________________
> Demitri Muna
>
> Department of Astronomy
> Ohio State University
>
> http://scicoder.org/
>
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.cv.nrao.edu
> http://listmgr.cv.nrao.edu/mailman/listinfo/fitsbits
>




More information about the fitsbits mailing list