fxextract: Extract a FITS extension

Package: fitsutil

Usage

fxextract input output groups

Parameters

input [string]
Can be a list of FITS filename or just one name if you are extracting extensions from it. Filename extensions are require.
output [string]
Output filename or directory. The root name of this filename is used if more than one extension is extracted followed by the group number.
groups = "" [string]
Specify the list of extensions from the input file to be extracted to the output file or directory; this list follows the syntax of the ranges utilities; i.e. things like 1,2,3; 1-9 or 9,7,13,1-4 are acceptable. Also '0' to represent the Primary FITS unit is accepted.
use_extnm = no
Speficify whether to use the value of the header keyword EXTNAME as the name of the output filename. If the keyword does not exist in the input header, the output root name is used instead.
phu = yes
Creates a dummy Primary Header unit for each of the extracted extensions. If the value is 'no', the input extension is copied verbatim to the output file.
verbose = yes
Print each operation as it takes place?

Description

Fextract is an extension to the 'imcopy' command allowing one or more extensions from the same MEF file to be extracted into different output files. FITS extensions are numbered from zero -as the primary unit, with one as the first extension two as the second extension and so on.

Examples

1. To extract extension 2,4,5 from a file and not produce a PHU for each of them. The output files will be extf2.fits, extf4.fits and extf5.fits.
im> fxextract mef.fits extf.fits groups=2,4,5 phu=no

Bugs

See also

imcopy, fxsplit