[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-devel] [bug #50099] Cropping of small regions fails
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-devel] [bug #50099] Cropping of small regions fails |
Date: |
Thu, 19 Jan 2017 21:46:45 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0 |
URL:
<http://savannah.gnu.org/bugs/?50099>
Summary: Cropping of small regions fails
Project: GNU Astronomy Utilities
Submitted by: leeskelvin
Submitted on: Fri 20 Jan 2017 06:46:43 AM JST
Category: None
Priority: 5 - Normal
Severity: 4 - Important
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
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
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50099>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [gnuastro-devel] [bug #50099] Cropping of small regions fails,
Mohammad Akhlaghi <=