fcopy -- Copy the contents of a FITS file to a new file
fcopy infile outfile
A seemingly do-nothing tool, combined with the FTOOLS's new extended filename syntax, fcopy becomes a significant data processing tool. By using the new filename syntax, this tool can download files from over the internet; search a file for an extension with a given extension name and version; delete or rename table columns and header keywords; create or overwrite columns and keywords using arithmetic expressions and data from other columns and keywords in the same extension; filter the rows of a table using a boolean expression, including the contents of a separate Good Time Interval (GTI) extension; and, create an N-dimensional image/histogram from the columns in a TABLE extension. fcopy can also be used to copy a frequently-used FITS file to shared memory, allowing rapid access to it by other FTOOLS. For more detailed descriptions of all these capabilities, see the FTOOLS help file, "filenames".
1. Filter an EVENTS table extension using a GTI extension, saving the results into the file outfile.fits.
ft> fcopy "infile.fits[EVENTS][gtifilter('gti.fits[STDGTI]')]" outfile.fits
2. Create a 2D histogram from the DETX and DETY columns of an EVENTS table.
ft> fcopy "infile.fits[EVENTS][bin (DETX,DETY)=1:1024:16]" outfile.fits
3. Copy a FITS file from the ftp site on the legacy machine.
ft> fcopy ftp://legacy.gsfc.nasa.gov/rosat/data/pspc/images/fits/rp200027_im1.fits outfile.fits
ftcopy, filenames, imfilter, colfilter, rowfilter, binfilter, calc_express