STScI Logo

ecextract stsdas.toolbox.imgtools.mstools



ecextract -- Select all extensions of one selected type from a FITS file

WARNING: This task can ONLY be used with a FITS image; (ie. no tables) they will cause this task to crash!

USAGE ecextract filename


The ecextract task is for simply selecting all extensions of a (1) selected type into a different file. There will be a display of types available for selection before you have to provide your choice for selection. You will be able to see, in real-time, the construction of your output file.


INPUT [string]
A string listing the input FITS file from which you want to select a (1) certain type of data extension.
OUTPUT [string]
This is a string which stores the name of the FITS file that is created.
EXTNAM [string]
A string specifying the extension type you wanted to uniquely select from the input FITS file. You must match one of the names that are listed as those present in it's entirety. This match is case sensitive.
OOPS [boolean]
This is a boolean expression test that is executed only when the output and input filename strings are the same. A warning is printed discussing the ramifications of your potential action and inquiring if you would like to proceed. An answer of [y/n] or [yes/no will spell out your fate.


1. The ecextract task is an easy way of grouping all of the file extensions you want into another FITS file and discarding those you think you could do without.

ms> ecextract NICdata.fits NICSCI.fits SCI

This command will create a FITS file of ONLY the SCI extensions from the imsets that a NICMOS observation provides.


You are able to request the same output name as your input name and the task will comply with your request. The danger is that your input file WILL be OVERWRITTEN! You will lose forever the contents of that input file as it is replaced with the output. You may want to do this but you should just be aware of the circumstance and reminded that you can choose a different filename for your output.



This script was written by E. W. Wyckoff, SSG.


For assistance using this or any other tasks, please contact or call the help desk at 410-338-1082.



Source Code · Package Help · Search Form · STSDAS