gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master 0832896: Library (fits.h): notice for HDU coun


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 0832896: Library (fits.h): notice for HDU counting starting from 0 in message
Date: Mon, 25 Oct 2021 07:42:03 -0400 (EDT)

branch: master
commit 08328963a7eee234e22b949f7ba0ffd9c46c8358
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>

    Library (fits.h): notice for HDU counting starting from 0 in message
    
    Until now, when the 'gal_fits_hdu_open' library function couldn't find the
    requested HDU in the given FITS file, its error message didn't contain any
    reference to the fact that HDU counting in Gnuastro starts from 0
    (following CFITSIO), not 1. This could cause confusions.
    
    With this commit, at the end of the error message, a sentence has been
    added to describe this special (counter-intuitive) situation.
    
    This was added after a fruiteful discussion with Peter Teuben during ADASS.
---
 THANKS                       | 1 +
 doc/announce-acknowledge.txt | 1 +
 lib/fits.c                   | 6 ++++--
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/THANKS b/THANKS
index d3b516c..c183bb8 100644
--- a/THANKS
+++ b/THANKS
@@ -106,6 +106,7 @@ support in Gnuastro. The list is ordered alphabetically (by 
family name).
     Vincenzo Testa                       vincenzo.testa@inaf.it
     Éric Thiébaut                        eric.thiebaut@univ-lyon1.fr
     Ignacio Trujillo                     trujillo@iac.es
+    Peter Teuben                         teuben@umd.edu
     David Valls-Gabaud                   david.valls-gabaud@obspm.fr
     Aaron Watkins                        aaron.watkins@oulu.fi
     Richard Wilbur                       richard.wilbur@gmail.com
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 74645fe..0b3905d 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -2,6 +2,7 @@ Alphabetically ordered list to acknowledge in the next release.
 
 Sepideh Eskandarlou
 Sebastian Luna-Valero
+Peter Teuben
 
 
 
diff --git a/lib/fits.c b/lib/fits.c
index 273eaa5..329a1bf 100644
--- a/lib/fits.c
+++ b/lib/fits.c
@@ -865,8 +865,10 @@ gal_fits_hdu_open(char *filename, char *hdu, int iomode)
             "    $ astfits %s\n\n"
             "The respective HDU number (or name, when present) may be used "
             "with the '--hdu' option in Gnuastro's programs (or the 'hdu' "
-            "argument in Gnuastro's libraries) to open the respective HDU.",
-            filename, hdu, filename, filename);
+            "argument in Gnuastro's libraries) to open the respective HDU. "
+            "If you are using counters/numbers to identify your HDUs, note "
+            "that since Gnuastro uses CFITSIO for FITS input/output, HDU "
+            "counting starts from 0", filename, hdu, filename, filename);
     }
 
   /* Clean up and the pointer. */



reply via email to

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