gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 10030cfc 11/39: Zeropoint: add magnitude range


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 10030cfc 11/39: Zeropoint: add magnitude range into the header of output
Date: Wed, 19 Apr 2023 12:18:23 -0400 (EDT)

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

    Zeropoint: add magnitude range into the header of output
    
    Until now, if user considered the magnitude range did not write in header
    of output.
    
    With this commit, two values named 'MAGMIN' and 'MAGMAX' are added to
    header of output. If user determine the magnitude range both of these will
    take value, otherwise if user do not determine magnitude range both of them
    do not have value in header.
---
 bin/script/zeropoint.mk | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/bin/script/zeropoint.mk b/bin/script/zeropoint.mk
index 5e82d96a..6fd16433 100644
--- a/bin/script/zeropoint.mk
+++ b/bin/script/zeropoint.mk
@@ -256,9 +256,11 @@ $(zeropoint): $(aperzeropoint)
 
 #      Find the best aperture, its zeropoint and standard deviation for
 #      writting in the header of the output.
-       mag=""
+       magmin=""
+       magmax=""
        if [ x"$(magrange)" != x ]; then
-         mag=$(magrange)
+         magmin=$$(echo "$(magrange)" | sed 's\,\ \' | awk '{print $$1}')
+         magmax=$$(echo "$(magrange)" | sed 's\,\ \' | awk '{print $$2}')
        fi
        asttable $$zp --output=$@.fits
        bestaper=$$(asttable $$zp --sort=ZPSTD --head=1 --column=APERTURE)
@@ -268,7 +270,8 @@ $(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."
+       astfits $@.fits --write=MAGMIN,"$$magmin","Minimum magnitude for 
obtaining zeropoint."
+       astfits $@.fits --write=MAGMAX,"$$magmax","Maximum magnitude for 
obtaining zeropoint."
 
        if [ x"$(keepzpap)" = x ]; then
 



reply via email to

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