bugGNU Astronomy Utilities - Bugs: bug #64420, Error message of wrongly specified...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #64420: Error message of wrongly specified HDU doesn't give the problematic option name

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Wed 12 Jul 2023 06:44:30 PM UTC
   
 
Category:  All Gnuastro Severity:  3 - Normal
Item Group:  Output not reasonable Status:  Fixed
Privacy:  Public Assigned to:  makhlaghi
Open/Closed:  Closed

Thu 13 Jul 2023 05:28:10 PM UTC, comment #1: 

This bug has been fixed in Commit ba07a0517e9. Thanks a lot Aaron for reporting this problem.

As always, if you'd like to use it before the Gnuastro 0.21 release, the tarball containing this change (and its corresponding book) are available in the links below:

https://akhlaghi.org/gnuastro.pdf
https://akhlaghi.org/gnuastro-latest.tar.lz

Mohammad Akhlaghi <makhlaghi>
Group administrator
Wed 12 Jul 2023 06:44:30 PM UTC, original submission:  

When the wrongly given HDU to a program is not for the '--hdu' option, the error message only talks about '--hdu'!

For example see the command below and assume that the desired HDU in 'grid.fits' is the 0th HDU.


$ astwarp input.fits --gridfile=grid.fits
"astwarp: grid.fits: only has one HDU.

You should tell Gnuastro's command-line programs to look for data in the
primary HDU with the '--hdu=0' option (or '-h0'). For library users, you
can put "0" (a string literal) for the function's HDU argument. For more,
see the FOOTNOTE below.

...


From the error message, the user will infer that they should add '--hdu=0' (or '-h0'); but that will not solve the problem! In fact, since '--hdu=0' tells Warp to look into the 0th HDU of 'input.fits', it will probably crash because the 0-th HDU usually doesn't have any data!

As a result, the situation becomes very confusing and frustrating.

In the example above, the error message should suggest using '--gridhdu=0'.

This issue was reported by Aaron Watkins.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-07-13 makhlaghi StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2023-07-12 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code