Cfitsio Toolkit - matlab.io.fits.writeImg
- : writeImg(file,
imagedata)
- : writeImg(file,
imagedata, fpixel)
write imagedata to a FITS file. The rows and column size must match the size of NAXIS, NAXIS etc
This is the equivalent of the cfitsio fits_write_subset function.
Inputs
file - opened fits file.
imagedata - Image data.
fpixel - start pixel to write from.
Outputs
None
Examples
Create a fits file and write a 10x10 image in the primary and image ext:
import_fits; fd = fits.createFile("myfitsfile.fits"); data = int16(zeros(10,10)); # primary fits.createImg(fd,class(data), size(data)); fits.writeImg(fd,data); # image ext fits.createImg(fd,class(data), size(data)); fits.writeImg(fd,data); # close file fits.closeFile(fd);