Chandra X-Ray Observatory
Skip to the navigation links
Last modified: December 2013

Jump to: Description · NOTES · See Also

AHELP for CIAO 4.9


Context: concept


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


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.


  • 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.

See Also

coords, level, pileup, times
ciao, ciao-install, ciaorc, parameter, stack, subspace
dm, dmascii, dmbinning, dmfiltering, dmopt, dmregions

Last modified: December 2013
Smithsonian Institute Smithsonian Institute

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