gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master d212d56e: zeropoint: HDU of the input is used


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master d212d56e: zeropoint: HDU of the input is used in all the commands
Date: Fri, 3 Nov 2023 13:38:40 -0400 (EDT)

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

    zeropoint: HDU of the input is used in all the commands
    
    Until now, when we used the inputs for the 'astquery', the '--hdu' value
    that the user gave was not used. When the inputs were in 1st HDU the script
    worked propely (because this was the default for 'astquery'). However, when
    the inputs were in the 0th HDU, the script crashed (because it could not
    find the input). For more, see https://savannah.gnu.org/support/?110952.
    
    With this commit, when the input image is given to 'astquery', the HDU
    given by the user is also pased to 'astquery'. A minor clarification has
    also been implemented in the book.
    
    This bug was reported by 'danc' on the Savannah issue above.
    
    This fixes bug #64852.
---
 NEWS                    | 3 +++
 bin/script/zeropoint.mk | 1 +
 doc/gnuastro.texi       | 4 ++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index bc3f22fe..4363a4db 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,9 @@ See the end of the file for license conditions.
     on Gnuastro's Matrix chat channel (#gnuastro:openastronomy.org).
 
 ** Bugs fixed
+  - bug #64852: astscript-zeropoint: crash when input is in 0-th HDU;
+    reported by 'danc' in https://savannah.gnu.org/support/?110952; fixed
+    by Sepideh Eskandarlou.
 
 
 
diff --git a/bin/script/zeropoint.mk b/bin/script/zeropoint.mk
index 575e0557..7f8daaff 100644
--- a/bin/script/zeropoint.mk
+++ b/bin/script/zeropoint.mk
@@ -65,6 +65,7 @@ $(stars): $(input) | $(tmpdir)
 ifeq ($(strip $(starcat)),)
        raw=$(subst .fits,-raw.fits,$@); \
        astquery gaia --dataset=dr3 \
+                --hdu=$(hduinput) \
                 --overlapwith=$(input) \
                 -csource_id -cra -cdec -cparallax \
                 -cparallax_error -cpmra -cpmdec --output=$$raw; \
diff --git a/doc/gnuastro.texi b/doc/gnuastro.texi
index 05afd1fc..de6d7bbd 100644
--- a/doc/gnuastro.texi
+++ b/doc/gnuastro.texi
@@ -8911,8 +8911,8 @@ HDU (extension) information: 'jplus.fits.fz'.
 
 Therefore, in order to be able to compare the SDSS and J-PLUS images, we 
should first subtract the sky from the J-PLUS image.
 To do that, we can either subtract the @code{BACKGROUND_MODEL} HDU from the 
@code{IMAGE} HDU using @ref{Arithmetic}, or we can use @ref{NoiseChisel} to 
find a good sky ourselves.
-As scientists we like to tweak and be creative, so let's estimate it ourselves!
-Also, in some cases, you may not have a pre-estimated Sky estimation, so you 
should be prepared:
+As scientists we like to tweak and be creative, so let's estimate it ourselves 
with the command below.
+Generally, you may not have a pre-estimated Sky estimation like above, so you 
should be prepared to subtract the sky yourself.
 
 @example
 $ astnoisechisel jplus-crop.fits --output=jplus-nc.fits



reply via email to

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