[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 85a5ad67 21/39: zeropoint: using single equal
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 85a5ad67 21/39: zeropoint: using single equal instead of the double for checking |
Date: |
Wed, 19 Apr 2023 12:18:25 -0400 (EDT) |
branch: master
commit 85a5ad676ad756ac1398f470f2dc007d06c4462c
Author: Zohreh Ghaffari <zoh.ghaffari@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
zeropoint: using single equal instead of the double for checking
Until now, in checking the '--keepzpap', we used the double equal sign
('=='), which can cause errors in some shells. Because they intterpret it
as pattern matching.
With this commit, this problem is fixed by using the single equal sign.
---
bin/script/zeropoint.mk | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/script/zeropoint.mk b/bin/script/zeropoint.mk
index c8dc76d5..9f326012 100644
--- a/bin/script/zeropoint.mk
+++ b/bin/script/zeropoint.mk
@@ -247,6 +247,7 @@ $(zeropoint): $(aperzeropoint)
# Obtained the zeropoint and zeropoint std of each apertures.
zp=$(subst .fits,-tmp.txt,$@)
+
echo "# Column 1: APERTURE [arcsec,f32,]" > $$zp
echo "# Column 2: ZEROPOINT [mag,f32,]" >> $$zp
echo "# Column 3: ZPSTD [mag,f32,]" >> $$zp
@@ -263,6 +264,7 @@ $(zeropoint): $(aperzeropoint)
magmax=$$(echo "$(magrange)" | sed 's\,\ \' | awk '{print $$2}')
fi
asttable $$zp --output=$@.fits
+
bestaper=$$(asttable $$zp --sort=ZPSTD --head=1 --column=APERTURE)
bestzp=$$(asttable $$zp --sort=ZPSTD --head=1 --column=ZEROPOINT)
beststd=$$(asttable $$zp --sort=ZPSTD --head=1 --column=ZPSTD)
@@ -286,7 +288,8 @@ $(zeropoint): $(aperzeropoint)
check=$$(echo $$a \
| awk -vb=$$bestaper \
'$$1>b-1e-6 && $$1<b+1e-6{print "yes"}')
- if [ x$$check == xyes ]; then bestaperstr=$$a; fi
+ if [ x$$check = xyes ]; then bestaperstr=$$a; fi
+
done
# Move the main table to the output and copy the Mag-vs-Zeroppoint
- [gnuastro-commits] master 2c027224 08/39: Zeropoint: change the output file, (continued)
- [gnuastro-commits] master 2c027224 08/39: Zeropoint: change the output file, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master ea79c2ba 14/39: Book: tutorial of zero point; removing the sky and running the script, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 48edcd91 13/39: Book: tutorial of zero point; preparing images for using the script, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 88b4c298 23/39: Book: tutorial of zero point; subsection catalog reference, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master aeb507b8 22/39: Book: correct the info format menus, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 069e12f4 24/39: Zeropoint: a bug about the matching of reference and main catalog, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master c4af3dfc 25/39: Book: tutorial of zero point; completing the catalog reference, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 536052fb 35/39: astscript-zeropoint: writting all receipes as in one shell, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 96137885 09/39: Zeropoint: keep Mag-vs-Zeropoint for best aperture in output, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 151e8bfc 20/39: Book: editing zero point estimation section, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 85a5ad67 21/39: zeropoint: using single equal instead of the double for checking,
Mohammad Akhlaghi <=
- [gnuastro-commits] master ea82d80a 29/39: Book: Use suggestive instead of imperative word, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 4bf867d3 26/39: Book: open imge by 'zscale' scale and options are written as code format, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 3cc85d96 34/39: astscript-zeropoint: new option --matchradius added, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 83e74d09 38/39: astscript-zeropoint: the name of some options are modified, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 21cd71bf 39/39: astscript-zeropoint: edits for merging into master branch, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 0fabd68e 30/39: Zeropoint: add an option for doing many jobs and check overlapping, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master 0e982706 33/39: astscript-zeropoint: polishing and improving the comments of the scripts, Mohammad Akhlaghi, 2023/04/19
- [gnuastro-commits] master fcf00960 37/39: astscript-zeropoint: Content of temorary file have been removed, Mohammad Akhlaghi, 2023/04/19