Write image to FITS file
fitswrite(imagedata,filename)
fitswrite(imagedata,filename,Name,Value)
fitswrite(imagedata,filename)
writes imagedata
to
the FITS file specified by filename
. If filename
does
not exist, fitswrite
creates the file as a simple
FITS file. If filename
exists, fitswrite
overwrites
the file or appends the image to the end of the file, depending on
the value of the writemode
argument.
fitswrite(
writes imagedata,filename
,Name,Value
)imagedata
to
the FITS file specified by filename
with additional
options specified by one or more Name,Value
pair
arguments.
|
Image array. |
|
Character vector specifying the name of an existing FITS file or the name you want to assign to a new FITS file. |
Specify optional comma-separated pairs of Name,Value
arguments.
Name
is the argument
name and Value
is the corresponding
value. Name
must appear
inside single quotes (' '
).
You can specify several name and value pair
arguments in any order as Name1,Value1,...,NameN,ValueN
.
|
Specified as one of the following:
Default: |
|
Specified as one of the following:
Default: |
Create a FITS file containing the red channel of an RGB image.
X = imread('ngc6543a.jpg'); R = X(:,:,1); fitswrite(R,'myfile.fits'); fitsdisp('myfile.fits');
Create a FITS file with three images constructed from the channels of an RGB image.
X = imread('ngc6543a.jpg'); R = X(:,:,1); G = X(:,:,2); B = X(:,:,3); fitswrite(R,'myfile.fits'); fitswrite(G,'myfile.fits','writemode','append'); fitswrite(B,'myfile.fits','writemode','append'); fitsdisp('myfile.fits');
For copyright information, see the cfitsiocopyright.txt
file.