gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master e39330ab 17/39: Zeropoint: adding sanity check


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master e39330ab 17/39: Zeropoint: adding sanity check for aperture option
Date: Wed, 19 Apr 2023 12:18:24 -0400 (EDT)

branch: master
commit e39330abbf9798996c35880fb4100a8ae95f7eca
Author: Elham Saremi <saremi_elham@yahoo.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Zeropoint: adding sanity check for aperture option
    
    Until now, we did not have a sanity check for --aperarcsec option. Without
    this, the user did not understand that the existence of it is necessary.
    
    With this commit, a sanity check is added to zero point script. So if the
    user doesn't use this option, one error will be printed.
---
 bin/script/zeropoint.in | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/bin/script/zeropoint.in b/bin/script/zeropoint.in
index 0bb04f80..4e7578c5 100644
--- a/bin/script/zeropoint.in
+++ b/bin/script/zeropoint.in
@@ -345,6 +345,15 @@ EOF
     fi
 fi
 
+# If an aperture size is not given at all.
+if [ x"$aperarcsec" = x ]; then
+    cat <<EOF
+$scriptname: ERROR: '--aperarcsec' (or '-a') is necessary at least with one 
value. Run with '--help' for more information.
+EOF
+    exit 1
+fi
+
+
 
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]