|MATLAB Function Reference|
Extract data from FITS file
data = fitsread(filename)
reads the primary data of the Flexible Image Transport System (FITS) file specified by
filename. Undefined data values are replaced by
NaN. Numeric data are scaled by the slope and intercept values and are always returned in double precision.
data = fitsread(filename, extname)
reads data from a FITS file according to the data array or extension specified in
extname. You can specify only one
extname. The valid choices for
extname are shown in the following table.
||Read data from the primary data array.
||Read data from the ASCII Table extension.
||Read data from the Binary Table extension.
||Read data from the Image extension.
||Read data from the Unknown extension.
data = fitsread(filename, extname, index)
is the same as the above syntax, except that if there is more than one of the specified extension type
extname in the file, then only the one at the specified
index is read.
data = fitsread(filename, 'raw', ...)
reads the primary or extension data of the FITS file, but, unlike the above syntaxes, does not replace undefined data values with
NaN and does not scale the data. The
data returned has the same class as the data stored in the file.
Read FITS file
tst0012.fits into a 109-by-102 matrix called
Here is the beginning of the data read from the file.
Read only the Binary Table extension from the file.
© 1994-2005 The MathWorks, Inc.