aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/ds9.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ds9.py')
-rw-r--r--scripts/ds9.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/ds9.py b/scripts/ds9.py
index af25a42..e8c8e88 100644
--- a/scripts/ds9.py
+++ b/scripts/ds9.py
@@ -15,13 +15,16 @@ def ds9_view(filename, regfile=None, regformat="ciao", regsystem="physical",
"""
cmd = [
"ds9", filename,
- "-regions", "format", regformat,
- "-regions", "system", regsystem,
- "-regions", regfile,
"-cmap", cmap,
- "-bin", "factor", binfactor,
+ "-bin", "factor", str(binfactor),
"-scale", scale,
]
+ if regfile:
+ cmd += [
+ "-regions", "format", regformat,
+ "-regions", "system", regsystem,
+ "-regions", regfile,
+ ]
if smooth:
- cmd += ["-smooth", "yes", "-smooth", "radius", smooth]
+ cmd += ["-smooth", "yes", "-smooth", "radius", str(smooth)]
subprocess.check_call(cmd)