aboutsummaryrefslogtreecommitdiffstats
path: root/astro/oskar
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-22 14:37:06 +0800
committerAaron LI <aly@aaronly.me>2017-08-22 14:41:25 +0800
commitd4b05a8233310bb0c7cd319f2a30cd91142a5671 (patch)
treef69bbc092a9d709af0b6b72149b994647883bae2 /astro/oskar
parent7db2b0e21e3d2ad11a98ca894ec5945470ed3a5f (diff)
downloadatoolbox-d4b05a8233310bb0c7cd319f2a30cd91142a5671.tar.bz2
fits2skymodel.py: Fix several small bugs
Diffstat (limited to 'astro/oskar')
-rwxr-xr-xastro/oskar/fits2skymodel.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/astro/oskar/fits2skymodel.py b/astro/oskar/fits2skymodel.py
index cc66092..1852013 100755
--- a/astro/oskar/fits2skymodel.py
+++ b/astro/oskar/fits2skymodel.py
@@ -176,7 +176,7 @@ class SkyModel:
def write_fits(self, outfile, oldheader=None, clobber=False):
if os.path.exists(outfile) and (not clobber):
- raise OSError("Sky FITS already exists: " % outfile)
+ raise OSError("Sky FITS already exists: %s" % outfile)
if oldheader is not None:
header = oldheader
header.extend(self.fits_header, update=True)
@@ -196,7 +196,7 @@ class SkyModel:
def write_mask(self, outfile, clobber=False):
if os.path.exists(outfile) and (not clobber):
- raise OSError("Sky mask already exists: " % outfile)
+ raise OSError("Sky mask already exists: %s" % outfile)
header = self.fits_header
header.add_history(datetime.now().isoformat())
header.add_history(" ".join(sys.argv))
@@ -243,8 +243,8 @@ def main():
help="save a FITS version of the converted sky model")
parser.add_argument("-o", "--outdir", dest="outdir",
help="output directory for sky model files")
- exgrp.add_argument("--create-mask", dest="create_mask",
- help="create a FITS mask for the output sky model")
+ parser.add_argument("--create-mask", dest="create_mask",
+ help="create a FITS mask for the output sky model")
parser.add_argument("infile", help="input FITS image")
parser.add_argument("outfile", nargs="?",
help="output OSKAR sky model (default: " +