fitsread
Read data from FITS file
Syntax
Description
reads the primary data of the Flexible Image Transport System (FITS) file specified by
data
= fitsread(filename
)filename
and returns it as an array. The fitsread
function replaces undefined data values with NaN
values and scales numeric
data by the slope and intercept values, always returning double precision values.
does not scale the data read from the file or replace undefined data values with
data
= fitsread(filename
,"raw"
)NaN
values. The returned data maintains the class type specified in the
file.
reads data from the FITS file with additional options using one or more name-value arguments.
For example, data
= fitsread(filename
,___,Name=Value
)TableColumns=[3,5]
reads the third and fifth columns of data in
the FITS file.
Examples
Input Arguments
Tips
MATLAB reads FITS image data in the order that it appears in the file, 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 displayed in MATLAB may appear flipped in the up-down direction (that is, about a horizontal axis) when compared to the same data displayed using other software packages. To flip an image in MATLAB, you can use the
flipud
function on the output offitsread
before displaying the image.
Version History
Introduced before R2006a