aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/ds9.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-16 20:04:40 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-17 01:16:46 +0800
commitb72650fa52ecc48381335c4f7adf820cba2b779a (patch)
tree7a9a51520a3ab77b6805304c722dfe08afa72434 /scripts/ds9.py
parentad90767adfda621046c0af580b75780a7426087c (diff)
downloadchandra-acis-analysis-b72650fa52ecc48381335c4f7adf820cba2b779a.tar.bz2
Finish test 'clean_evt2.py' and fix several issues!
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)