[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #65571] Crop returns successfully when no output was made
From: |
Mohammad Akhlaghi |
Subject: |
[bug #65571] Crop returns successfully when no output was made |
Date: |
Mon, 8 Apr 2024 15:05:46 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?65571>
Summary: Crop returns successfully when no output was made
Group: GNU Astronomy Utilities
Submitter: makhlaghi
Submitted: Mon 08 Apr 2024 09:05:46 PM CEST
Category: Crop
Severity: 3 - Normal
Item Group: Output not reasonable
Status: In Progress
Privacy: Public
Assigned to: makhlaghi
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Mon 08 Apr 2024 09:05:46 PM CEST By: Mohammad Akhlaghi <makhlaghi>
Command-line programs (including all of Gnuastro's programs) return a non-zero
value to the shell when they don't produce any output. This can be due to
issues, and many scripts rely on this return value to abort/change the
behavior automatically when it happens.
However, as of Gnuastro 0.22, when no image is produced by Crop, it still
returns a successful value to the shell. This bug can be reproduced with the
commands below:
$ astarithmetic 100 100 2 makenew 10 mknoise-sigma -o img.fits
$ if astcrop img.fits --mode=img --center=1000,1000 --width=3 \
-ocrop.fits; then \
echo GOOD; \
else \
echo BAD; \
fi
Crop 0.22.26-75d7dd started on Mon Apr 8 21:04:06 2024
- Read metadata of 1 dataset. 0.001101 seconds
---- crop.fits no overlap: 0 inputs.
Crop finished in: 0.010097 seconds
GOOD
This was reported by Sepideh Eskandarlou.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65571>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #65571] Crop returns successfully when no output was made,
Mohammad Akhlaghi <=