irafconvert

stsynphot.stio.irafconvert(iraf_filename, sep='$')[source]

Convert IRAF filename to regular filename.

Acceptable IRAF formats:

  • $path/file - path assumed to be environment variable.

  • path$file - path is special IRAF shortcut for TRDS data directory (case-insensitive).

Notes on special IRAF shortcut:

  • synphot points to software data directory.

  • crrefer points to stsynphot.config.conf.rootdir.

  • Otherwise, decoded based on stsynphot.config.conf.irafshortcutfile that must contain the following named columns:

    1. IRAFNAME - The shortcut for look-up. If multiple matches are found, the first match is used.

    2. RELPATH - Path relative to stsynphot.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.