About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: December 2006

URL: http://cxc.harvard.edu/ciao3.4/autoname.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 autoname Context: concept

Synopsis

Autonaming is a feature available in various tools for automatically naming an output file based upon the name of an input file.

Description

If the user specifies an output file name for a tool as "." (or more generally, "path/.") and the tool supports autonaming for that filename parameter, the tool will generate an output file name for the user. The name string will include fields from the input file name and a field selected by the tool.

The parameter section of a tool's help file will tell you if a particulat parameter supports the autoname facility: the autoname field will be set to "yes" for the parameter.

The autonaming library function parses an input file name into 4 fields: a path, a name, an extension, and a suffix. The suffix is defined as the part of the filename after (and including) the last '.'. The extension is defined as the part of the filename after (and including) the last '_' up to the suffix.

Some examples:

input file name path name extension suffix
"path/name_ext.suffix" "path" "name" _ext" .suffix"
"path/name.suffix" "path" "name" "" .suffix"
"path/name_ext" "path" "name" "_ext" ""

The autonamer accepts an "extension" string chosen by the tool, which will be detailed in the description of the parameter. It replaces the parsed extension with this new extension. Thus, if the output name is "/outpath/.", the new extension is "txe", the input filename is "name", and the input suffix is ".fits", we will get "/outpath/name_txe.fits" as the automatic filename.

NOTES

  • Autonaming always produces a filename with the same suffix as the input file. Thus, if the input is a ".fits" file, there is no way to generate a name ending in ".lis" by autonaming.
  • There are times when the user wants the trailing "_foo" field in an input file name to be preserved. Autonaming will always replace it.
  • Autonaming can get confused by DataModel filter specifications in the input filename.

Hardcopy (PDF): A4 | Letter
Last modified: December 2006



The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory.
60 Garden Street, Cambridge, MA 02138 USA.    Email: cxcweb@head.cfa.harvard.edu
Smithsonian Institution, Copyright © 1998-2004. All rights reserved.