[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-devel] [sr #109227] Cropping of small regions fails
From: |
Lee Kelvin |
Subject: |
[gnuastro-devel] [sr #109227] Cropping of small regions fails |
Date: |
Thu, 19 Jan 2017 17:21:23 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36 |
URL:
<http://savannah.gnu.org/support/?109227>
Summary: Cropping of small regions fails
Project: GNU Astronomy Utilities
Submitted by: leeskelvin
Submitted on: Thu 19 Jan 2017 05:21:21 PM GMT
Category: ImageCrop
Priority: 5 - Normal
Severity: 4 - Important
Item Group: Crash
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
When attempting to crop a region with either axis of length 1 pixel or 2
pixels, ImageCrop fails, with different errors.
The attached file 'input.fits' was used to test. This file is a 9x9 FITS image
which was cropped from a larger image using the NASA HEASARC program
'fitscopy'. Note that this file was initially produced to test the feature
request in support item #109226.
First, I attempted to crop a 2x2 pixel region from the lower-left corner of
the image. The command and resultant FITSIO error are shown below:
$ astimgcrop --section=1:3,1:3 input.fits
ImageCrop started on Thu Jan 19 17:06:39 2017
- Read metadata of 1 images. 0.000293 seconds
FITSIO status = 307: bad first row number
Attempt to read past end of array:
Image has 4 elements;
Tried to read 3 elements starting at element 3.
astimgcrop: Error in CFITSIO, see above.
An output file was produced of size 0 bytes.
Curiously, running this command with an aim to crop regions of varying
rectangular size fail, but only to a point. In my testing these dimensions
failed: 1:3,1:3; 1:3,1:4; 1:3,1:5. However, 1:3,1:6 succeeded. Note however
that varying the dimension of the 1st axis whilst keeping the second axis
length fixed always fails (e.g. 1:9,1:3 fails).
Second, I attempted to crop a 1x1 pixel region from the lower-left corner of
the image. The command and resultant error are shown below:
$ astimgcrop --section=1:2,1:2 input.fits
ImageCrop started on Thu Jan 19 17:08:08 2017
- Read metadata of 1 images. 0.000493 seconds
astimgcrop: the bottom left corner coordinates cannot be larger or equal to
the top right's! Your section string (1:2,1:2) has been read as: bottom left
coordinate (1, 1) to top right coordinate (1, 1)
No output file is produced after running this second command.
This second command always fails in my testing for any dimension rectangular
region where one of the axes is of length 1 pixel.
I believe the causes of these two errors to be separate, but I am unsure,
hence my listing them together in this bug report. I'm unsure what may be the
cause for the former bug, but it seems like the cause of the latter may be an
overly restrictive internal hard-coded limitation.
Regards,
Lee Kelvin
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 19 Jan 2017 05:21:22 PM GMT Name: input.fits Size: 8kB By:
leeskelvin
<http://savannah.gnu.org/support/download.php?file_id=39514>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/support/?109227>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-devel] [sr #109227] Cropping of small regions fails,
Lee Kelvin <=