fextract -- Extract (copy) an extension from a FITS file into a new FITS file
fextract infile[ext#] outfile[ext#]
This task creates a new FITS file by copying the primary array or an extension from an existing FITS file into the new file. If an extension is copied, then the output file will have a null primary array with just the minimum set of required primary header keywords followed by the copied extension. If the extension to be copied is an image, it can be place in the primary array be specifying an extension of 0 in for the output file. The output extension number is ignored for all other cases. The input FITS file is not modified by this task.
1. Extract the second extension from the input file test.fits and copy it to a new FITS file (with an empty primary array) called new.fits
ft> fextract test.fits[2] new.fits
2. Extract the primary array from the file test.fits and create a new FITS file called out.fits
ft> fextract test.fits[0] out.fits
3. Extract an image extension and place it in the primary array of the output file.
ft> fextract test.fits[3] out.fits[0]
ftcopy, ftselect, ftappend, ftmerge. fv, the interactive FITS file editor, can also be used to copy FITS extensions to a new file.