readFITSbintable {FITSio} | R Documentation |
Read a FITS binary table from an open connection to a FITS file.
readFITSbintable(zz, hdr)
zz |
file handle; see Example. |
hdr |
vector of header information from readFITSheader . |
readFITSbintable
reads the data from the binary table part of a FITS
Header and Data Unit containing binary table data. The header must be
read first by readFITSheader
to provide the variable hdr.
Binary tables are multi-column files with one or more rows. Each
column has an individual data type and number of entries per cell
(i.e., a cell may contain a scalar or vector).
Binary table bit, complex, and array descriptor data types are not implemented in this release due to a lack of examples for testing.
col |
Data from each column, either a vector or an array. |
hdr |
Vector with parsed header. |
colNames |
Vector of column names, TTYPEn FITS variable. |
colUnits |
Vector of column units, TUNITn FITS variable. |
TNULLn |
Vector of undefined value definitions, FITS variable. |
TSCALn |
Vector of multipliers for scaling, FITS variable. |
TZEROn |
Vector of zeros for scaling, FITS variable. |
TDISPn |
Vector of format information, FITS variable. |
Graphical FITS viewers such as fv (http://heasarc.gsfc.nasa.gov/ftools/fv/) and SAOImage DS9 (http://hea-www.harvard.edu/RD/ds9/) have excellent facilities for displaying FITS data, headers, and file structure. Having one or more graphical viewers available will prove extremely useful for working with FITS files, even when the data are read into R for further processing. fv and SAOImage DS9 are in active devlopement with support for unix, Windows, and Mac OS-X operating systems, and are available at no cost.
Andrew Harris
Hanisch et al., Astron. Astrophys. 376, 359-380 (2001)
readFITS
, readFITSheader
,
readFITSarray
, file
require("FITSio") ## Either download example file from ## <http://fits.gsfc.nasa.gov/fits_samples.html> ## and use ## Not run: filename <- "IUElwp25637mxlo.fits" ## or, for local example use filename <- system.file("fitsExamples", "IUElwp25637mxlo.fits", package = "FITSio") ## Open file, read header and table, close file. zz <- file(description = filename, open = "rb") hdr <- readFITSheader(zz) # read primary header hdr <- readFITSheader(zz) # read extension header D <- readFITSbintable(zz, hdr) close(zz) ## Look at contents summary(D) D$hdr[which(D$hdr=="BITPIX")+1] # BITPIX value from header D$colNames plot(D$col[[5]], ylab = "Value", main = D$colNames[5], type = "l")