gnuastro-devel
[Top][All Lists]
Advanced

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

[bug #66869] Random behaviour when no overlap exists


From: Raul Infante-Sainz
Subject: [bug #66869] Random behaviour when no overlap exists
Date: Tue, 4 Mar 2025 08:35:37 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?66869>

                 Summary: Random behaviour when no overlap exists
                   Group: GNU Astronomy Utilities
               Submitter: infantesainz
               Submitted: Tue 04 Mar 2025 01:35:31 PM UTC
                Category: Crop
                Severity: 3 - Normal
              Item Group: Output not reasonable
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 04 Mar 2025 01:35:31 PM UTC By: Raul Infante-Sainz <infantesainz>
The behaviour of the program Crop is strange. I am trying to crop an image for
which there is no overlap. In principle this should be fine, no output will be
generated. The problem is that in some cases the execution of this task seems
to succeed, but in other cases it fails.

I have reduced the problem to a few lines so you can test and check it. With
the lines below a small image is created. Then, inside an infinite loop, every
1 second it tries to crop a small portion of the image that does not overlap
with the image. Before *and* after this crop command, BEFORE and AFTER should
be printed. 

# Create a small image
astarithmetic 50 50 2 makenew --output image.fits

cropline='astcrop image.fits --output=crop.fits --center=60,60 --width=5,5
--mode=img --quiet'

# Every 1 second, print BEFORE, and crop the image, and print AFTER
while sleep 1; do
    echo " "
    echo "BEFORE" && $cropline && echo "AFTER"
done


Since I am using *&&*, if the crop is fine I should obtain BEFORE and AFTER
every time. However, this is not what I obtain. Sometimes it is fine but other
times it fails but saying nothing. And it is random! Have a look at the first
outputs I get:

 - Write (final): image.fits
Arithmetic finished in 0.003369 seconds

BEFORE
AFTER

BEFORE

BEFORE
AFTER

BEFORE

BEFORE
AFTER

BEFORE
AFTER

BEFORE

BEFORE

BEFORE
AFTER









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66869>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

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