Thu 19 Jan 2017 09:46:43 PM UTC, comment #1:
This item has been reassigned from the project GNU Astronomy Utilities support tracker to your tracker.
The original report is still available at support #109227
Following are the information included in the original report:
[field #0] Item ID: 109227 [field #1] Group ID: 11425 [field #2] Open/Closed: Open [field #3] Severity: 4 - Important [field #4] Privacy: Public [field #8] : Unknown support Field Display Type [field #9] Category: ImageCrop [field #10] Submitted by: leeskelvin [field #11] Assigned to: None [field #12] Submitted on: Fri 20 Jan 2017 02:21:21 AM JST [field #13] Summary: Cropping of small regions fails [field #14] Original Submission: 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
[field #16] Item Group: Crash [field #17] Status: None [field #18] Component Version: None [field #19] Operating System: GNU/Linux [field #20] Reproducibility: None [field #21] Size (loc): None [field #22] Fixed Release: None [field #23] Planned Release: None [field #24] Effort: 0.00 [field #28] Priority: 5 - Normal [field #31] Percent Complete: 0% [field #33] Release: None [field #58] Custom Select Box #1: None [field #59] Custom Select Box #2: None [field #60] Custom Select Box #3: None [field #61] Custom Select Box #4: None [field #62] Custom Select Box #5: None [field #63] Custom Select Box #6: None [field #64] Custom Select Box #7: None [field #65] Custom Select Box #8: None [field #66] Custom Select Box #9: None [field #67] Custom Select Box #10: None
|