matlab.io.fits.writeImg
Write FITS image data
Syntax
matlab.io.fits.writeImg(fptr,data)
matlab.io.fits.writeImg(fptr,data,fpixel)
Description
matlab.io.fits.writeImg(fptr,data) writes image data to a FITS
file. The number of rows and columns in data must respectively
match the values of the NAXIS2 and NAXIS1 keywords
of the FITS file. Further dimensions of data must match the values
of the keywords NAXIS3, NAXIS4, and so on.
matlab.io.fits.writeImg(fptr,data,fpixel) writes image data to a
subset of a FITS image. The fpixel argument is the coordinate of
the first pixel in the FITS image region.
Examples
Tips
This function corresponds to the
fits_write_subset(ffpss) function in the CFITSIO library C API.To use this function, you must be familiar with the CFITSIO C interface. You can access the CFITSIO documentation at the CFITSIO website.
MATLAB® writes raw FITS image data in the order given, but some software packages for reading and writing FITS image data assume that the image data is stored in an order in which the bottom row of the image is first. Consequently, FITS image data written by MATLAB may appear flipped in the up-down direction (that is, about a horizontal axis) when displayed using other software packages. To flip an image in MATLAB, you can use the
flipudfunction on the image data before writing the image withmatlab.io.fits.writeImg.