# NOT RUN {
require(FITSio)
Z <- matrix(1:15, ncol = 3)
filename <- paste(tempdir(), "test.fits", sep="")
writeFITSim(Z, file = filename, c1 = 'Test FITS file',
crpix = c(1,1), crvaln = c(10, 100), cdeltn = c(8, 2),
ctypen = c('Distance', 'Time'),
cunitn = c('Furlongs', 'Fortnights'))
X <- readFITS(filename)
ax1 <- axVec(1, X$axDat)
ax2 <- axVec(2, X$axDat)
xlab <- X$axDat$ctype[1]
ylab <- paste(X$axDat$ctype[2], " [", X$axDat$cunit[2], "]", sep = "")
image(ax1, ax2, X$imDat, xlab = xlab, ylab = ylab)
## Clean up files to avoid clutter
unlink(filename)
# }
Run the code above in your browser using DataLab