From db932f086711f04c19447711f1630239b57e7e5f Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Mon, 21 Mar 2016 14:20:32 +0100 Subject: [PATCH] Minor script modifications. --- cscripts/cta_kb_bkgrates.py | 8 +++----- cscripts/cta_kb_root2caldb.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cscripts/cta_kb_bkgrates.py b/cscripts/cta_kb_bkgrates.py index ca16f81..559e73d 100755 --- a/cscripts/cta_kb_bkgrates.py +++ b/cscripts/cta_kb_bkgrates.py @@ -105,10 +105,8 @@ if __name__ == '__main__': for irfname in irfs: # Build background filename - head, tail = os.path.split(irfname) - irf = tail.strip(".dat") - filename = "bkg_"+irf+".txt" - print(filename) + fname = "bkg_"+os.path.basename(irf).strip(".dat")+".txt" + print(fname) # Make background file - make_file_function(irfname, filename) + make_file_function(irf, fname) diff --git a/cscripts/cta_kb_root2caldb.py b/cscripts/cta_kb_root2caldb.py index 7e3bdac..fca22eb 100755 --- a/cscripts/cta_kb_root2caldb.py +++ b/cscripts/cta_kb_root2caldb.py @@ -7,7 +7,7 @@ # area (i.e. the area before applying any theta cut). This is required by # GammaLib as the maximum likelihood analysis does not imply any theta cut. # -# Copyright (C) 2014 Juergen Knoedlseder +# Copyright (C) 2014-2016 Juergen Knoedlseder # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by -- libgit2 0.21.4