gnuastro-devel
[Top][All Lists]
Advanced

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

[gnuastro-devel] [bug #48978] Bad coordinates in polygon mode do not abo


From: Mohammad Akhlaghi
Subject: [gnuastro-devel] [bug #48978] Bad coordinates in polygon mode do not abort
Date: Fri, 2 Sep 2016 17:21:37 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0

URL:
  <http://savannah.gnu.org/bugs/?48978>

                 Summary: Bad coordinates in polygon mode do not abort
                 Project: GNU Astronomy Utilities
            Submitted by: makhlaghi
            Submitted on: Sat 03 Sep 2016 02:21:34 AM JST
                Category: ImageCrop
                Severity: 4 - Important
              Item Group: Output not reasonable
                  Status: Confirmed
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

In the values to the `--polygon' option, when a coordinate has two `.'s in it,
ImageCrop will not halt with an error. Instead, it will continue and not give
any error at all.

To reproduce this bug, please run this command in the build directory after
running `make check' (this is actually taken from
`tests/imgcrop/wcspolygon.sh', with a minor modification):


./src/imgcrop/astimgcrop ./tests/mkprofcat*.fits --wcsmode --zeroisnotblank
--output=bugcheck.fits
--polygon=0.99980497,1.0001967:0.998378,1.0012267:0.9999766,1.00132.17


Note how the last coordinate in the values to polygon is `1.00132.17', it
should have been `1.0013217'. Such errors can happen when giving the
coordinates by hand. Ideally ImageCrop should recognize this and abort, but it
doesn't.

The problem can most probably be fixed within the `polygonparser' function of
`src/imgcrop/crop.c' which is in charge of parsing the polygon values and is
called within ImageCrop's `ui.c'. We should set it to print an error message
an abort in such situations. I can't fix it right now, but it shouldn't be
hard, so if you can do it sooner, please feel free to post the fix ;-).




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48978>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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