STScI Logo

imkeyname stsdas.sobsolete



imkeyname -- Use a header keyword value to rename one or more image files.


imkeyname image keyword


This task is used to rename images read by the FITS reader. When reading FITS files with the rfits task, the user supplies a root name that is used to generate a sequential series of image and table names. Because the information in the calibration reference files is cross referenced by image name, image files must be renamed to their original name (which is stored as a header keyword value). By supplying this task with the root name given to rfits in the form of an image template and the name of the header keyword containing the original file name, the user can rename all the images read from the FITS tape in one operation.


image [file template]
Name of the image, or template describing a series of images, that will be renamed.
keyword [string]
Keyword containing the new image name.
(dirname = "") [string]
Directory in which the newly renamed images will be written. The default is to place the images in the current directory.
(verbose = no) [boolean]
Produce a line of screen output with both the old and new image names of each file that is renamed? This parameter lets the user monitor the task's progress; this is particularly useful when renaming large sets of images, which can take considerable time.


1. The first command reads a tape containing FOS reference files in FITS format from tape drive "mta". The reference files are given the names yref001.hhh thru yref999.hhh. The second command renames these images with the name stored in the keyword HEADER_F.

  to> rfits mta 1-999 yref
  to> imkeyname yref*.hhh header_f




Source Code · Package Help · Search Form · STSDAS