[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 5ac01699 4/5: DS9 script: fixing bug related t
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 5ac01699 4/5: DS9 script: fixing bug related to the input file variable name |
Date: |
Sat, 19 Mar 2022 14:22:41 -0400 (EDT) |
branch: master
commit 5ac016998861f563e443d26dc1f082b2f1c2b391
Author: Raul Infante-Sainz <infantesainz@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
DS9 script: fixing bug related to the input file variable name
Until this commit, variable name of the input file was wrongly used. It was
'input' while it should be 'inputs'. This problem cames from commit
"9947331d Installed scripts: not calling bash, several stylistic
improvements", when the variable 'inputs' was set but the old 'input' were
not appropriately replaced.
With this commit, all 'input' variables have been replaced by 'inputs' and
this problem has been fixed.
---
bin/script/ds9-region.in | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/bin/script/ds9-region.in b/bin/script/ds9-region.in
index ac394427..5f01c662 100644
--- a/bin/script/ds9-region.in
+++ b/bin/script/ds9-region.in
@@ -6,6 +6,7 @@
# Mohammad Akhlaghi <mohammad@akhlaghi.org>
# Contributing author(s):
# Samane Raji <samaneraji@protonmail.com>
+# Raul Infante-Sainz <infantesainz@gmail.com>
# Copyright (C) 2021-2022 Free Software Foundation, Inc.
#
# Gnuastro is free software: you can redistribute it and/or modify it under
@@ -309,8 +310,8 @@ if [ x"$mode" = xwcs ]; then unit="\""; else unit=""; fi
# Write the metadata in the output.
printf "# Region file format: DS9 version 4.1\n" > $out
printf "# Created by $scriptname (GNU Astronomy Utilities) $version\n" >> $out
-if [ x"$input" = x ]; then printf "# Input from stdin\n" >> $out
-else printf "# Input file: $input (hdu $hdu)\n" >> $out
+if [ x"$inputs" = x ]; then printf "# Input from stdin\n" >> $out
+else printf "# Input file: $inputs (hdu $hdu)\n" >> $out
fi
printf "# Columns: $col\n" >> $out
if [ x"$namecol" != x ]; then
@@ -327,7 +328,7 @@ else printf "image\n" >> $out; fi
# Write each region's results (when no input file is given, read from the
# standard input).
if [ x"$namecol" = x ]; then
- if [ x"$input" = x ]; then
+ if [ x"$inputs" = x ]; then
cat /dev/stdin \
| asttable --column=$col \
| while read a b; do \
@@ -335,14 +336,14 @@ if [ x"$namecol" = x ]; then
$a $b $radius $unit >> $out; \
done
else
- asttable $input --hdu=$hdu --column=$col \
+ asttable $inputs --hdu=$hdu --column=$col \
| while read a b; do \
printf "circle(%f,%f,%f%s)\n" \
$a $b $radius $unit >> $out; \
done
fi
else
- if [ x"$input" = x ]; then
+ if [ x"$inputs" = x ]; then
cat /dev/stdin \
| asttable --column=$col --column=$namecol \
| while read a b c; do \
@@ -350,7 +351,7 @@ else
$a $b $radius $unit $c >> $out; \
done
else
- asttable $input --hdu=$hdu --column=$col --column=$namecol \
+ asttable $inputs --hdu=$hdu --column=$col --column=$namecol \
| while read a b c; do \
printf "circle(%f,%f,%f%s) # text={%g}\n" \
$a $b $radius $unit $c >> $out; \