irafconvert¶
- stsynphot.stio.irafconvert(iraf_filename, sep='$')[source]¶
Convert IRAF filename to regular filename.
Acceptable IRAF formats:
$path/file-pathassumed to be environment variable.path$file-pathis special IRAF shortcut for TRDS data directory (case-insensitive).
Notes on special IRAF shortcut:
synphotpoints to software data directory.crreferpoints tostsynphot.config.conf.rootdir.Otherwise, decoded based on
stsynphot.config.conf.irafshortcutfilethat must contain the following named columns:IRAFNAME- The shortcut for look-up. If multiple matches are found, the first match is used.RELPATH- Path relative tostsynphot.config.conf.rootdir.
If separator is not found, input is returned as-is.
- Parameters:
- iraf_filenamestr
IRAF filename.
- sepchar, optional
Path-file separator.
- Returns:
- reg_filenamestr
Regular filename.
- Raises:
- KeyError
Environment variable or IRAF shortcut is undefined.
- TypeError
Input is not a string.