gnuastro-commits
[Top][All Lists]
Advanced

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

[gnuastro-commits] master aac9048 7/7: Library (fits.h): better warning


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master aac9048 7/7: Library (fits.h): better warning message in gal_fits_key_write_filename
Date: Mon, 4 Oct 2021 18:51:29 -0400 (EDT)

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

    Library (fits.h): better warning message in gal_fits_key_write_filename
    
    Until now, the warning message just mentioned that the file name will be
    truncated. But it didn't clarify that this is just metadata and won't
    affect the analysis or output data. Also, it didn't say how the message can
    be supressed.
    
    With this commit, the warning message has been expanded to mention all
    these points and make it more obvious to the user.
    
    This was suggested by Sepideh Eskandarlou.
---
 lib/fits.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/fits.c b/lib/fits.c
index 5fe11bd..8e0e7c6 100644
--- a/lib/fits.c
+++ b/lib/fits.c
@@ -1781,10 +1781,16 @@ gal_fits_key_write_filename(char *keynamebase, char 
*filename,
 
               /* Let the user know that the name will be truncated. */
               if(quiet==0)
-                error(0,0, "%s: WARNING: '%s' is too long to fit "
-                      "into a FITS keyword value (max of %zu characters), "
-                      "it will be truncated", __func__, filename,
-                      maxlength);
+                error(0,0, "%s: WARNING: the filename '%s' (not "
+                      "including directories) is too long to fit into "
+                      "a FITS keyword value (max of %zu characters). "
+                      "It will therefore be truncated. If you are "
+                      "using Gnuastro's programs, this message is "
+                      "only about the metadata (keyword that keeps "
+                      "name of input), so it won't affect the output "
+                      "analysis and data. In this case, you can supress "
+                      "this warning message with a '--quiet' option",
+                      __func__, filename, maxlength);
             }
 
           /* Convert the last useful character and save the file name.*/



reply via email to

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