gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master d44ce8c0 10/39: zeropoint: use --magrage provi


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master d44ce8c0 10/39: zeropoint: use --magrage provided by user
Date: Wed, 19 Apr 2023 12:18:23 -0400 (EDT)

branch: master
commit d44ce8c02100a347b645c289c52e3ec2f01001e9
Author: Sepideh Eskandarlou <sepideh.eskandarlou@gmail.com>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    zeropoint: use --magrage provided by user
    
    Until now the magnitdue range was hard-coded in the script and not possible
    to change at run-time. Also, the range was not written in the output FITS
    file.
    
    With this commit, the value of the '--magrange' option (set at run-time) is
    now used and the value is written in the output FITS file as a keyword.
---
 bin/script/zeropoint.mk | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/bin/script/zeropoint.mk b/bin/script/zeropoint.mk
index 8a87552b..5e82d96a 100644
--- a/bin/script/zeropoint.mk
+++ b/bin/script/zeropoint.mk
@@ -254,8 +254,12 @@ $(zeropoint): $(aperzeropoint)
          cat $(tmpdir)/zeropoint-$$a.txt        >> $$zp
        done
 
-#      Find the best aperture and its zeropoint and write in the header of
-#      the output.
+#      Find the best aperture, its zeropoint and standard deviation for
+#      writting in the header of the output.
+       mag=""
+       if [ x"$(magrange)" != x ]; then
+         mag=$(magrange)
+       fi
        asttable $$zp --output=$@.fits
        bestaper=$$(asttable $$zp --sort=ZPSTD --head=1 --column=APERTURE)
        bestzp=$$(asttable $$zp --sort=ZPSTD --head=1  --column=ZEROPOINT)
@@ -264,6 +268,7 @@ $(zeropoint): $(aperzeropoint)
        astfits $@.fits --write=ZPAPER,"$$bestaper","Best aperture."
        astfits $@.fits --write=ZPVALUE,"$$bestzp","Best zeropoint."
        astfits $@.fits --write=ZPSTD,"$$beststd","Best standard deviation of 
zeropoint."
+       astfits $@.fits --write=MAGRNG,"$$mag","Magnitude range."
 
        if [ x"$(keepzpap)" = x ]; then
 



reply via email to

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