aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/fg21sim11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/fg21sim b/bin/fg21sim
index 052c50e..cf44efa 100755
--- a/bin/fg21sim
+++ b/bin/fg21sim
@@ -18,14 +18,19 @@ import fg21sim
from fg21sim.share import CONFIGS, COSMO
from fg21sim.utils import setup_logging
+VER_INFO = "%(name)s: v%(version)s @ %(date)s" % {
+ "name": fg21sim.__pkgname__,
+ "version": fg21sim.__version__,
+ "date": fg21sim.__date__
+}
+
def main():
parser = argparse.ArgumentParser(
description="Simulate the radio foregrounds for 21cm EoR signal",
epilog="Set environment variable 'DEBUG_FG21SIM=1' to force debug!")
parser.add_argument("config", help="user configuration file")
- parser.add_argument("-v", "--version", action="version",
- version="%(prog)s: version "+fg21sim.__version__)
+ parser.add_argument("-v", "--version", action="version", version=VER_INFO)
parser.add_argument("-l", "--log", dest="loglevel", default=None,
choices=["debug", "info", "warning",
"error", "critical"],
@@ -52,7 +57,7 @@ def main():
logfile=args.logfile)
tool = os.path.basename(sys.argv[0])
logger = logging.getLogger(tool)
- logger.info("FG21sim: version %s" % fg21sim.__version__)
+ logger.info(VER_INFO)
logger.info("COMMAND: {0}".format(" ".join(sys.argv)))
# Save/backup current configurations