The SKIRT project
advanced radiative transfer for astrophysics
pts.skiupgrade.do.upgrade_ski_files Namespace Reference

Upgrade ski files in a given directory to the latest version of SKIRT. More...

Functions

"upgrade ski files in a given directory to the latest version of SKIRT 9" do ((str,"directory containing the ski files to be upgraded") skiDirPath)

Detailed Description

Upgrade ski files in a given directory to the latest version of SKIRT.

This script upgrades all SKIRT 9 ski files in a given directory to be appropriate for the latest version of SKIRT 9. Specifically, the script iterates over all files in the directory with the .ski filename extension and performs as follows for each:

  • if the file is not a SKIRT parameter file, or it is intended for a SKIRT version before version 9, an error message is logged and the file is otherwise ignored.
  • if the file is a SKIRT 9 parameter file and it is up to date with the latest version of SKIRT 9, an informational message is logged and the file is otherwise ignored.
  • if the file is a SKIRT 9 parameter file that needs upgrading, it is first copied to a backup version with a filename including a time stamp, it is then replaced by a version upgraded to the latest version of SKIRT 9, and a warning message is logged.

The script takes a single positional string argument specifying the path to the directory containing the ski files to be upgraded, or "." (a single period) for the current directory.

See the pts.skiupgrade.skiupgrade module for more information on the ski file upgrade process.