# NOT RUN {
require(FITSio)
## Make a test file.
Z <- matrix(1:15, ncol = 3)
filename <- paste(tempdir(), "test.fits", sep="")
writeFITSim(Z, filename)
## Open file, read header and array, close file and delete.
zz <- file(description = filename, open = "rb")
header <- readFITSheader(zz) # image data off primary header
D <- readFITSarray(zz, header)
close(zz)
## Look at data list, header file, and parsed header
str(D)
image(D$imDat)
str(header)
str(parseHdr(header))
# }
Run the code above in your browser using DataLab