mainGNU Astronomy Utilities - Support: sr #109227, Reassigned to another tracker...

 
 

sr #109227: Reassigned to another tracker [was: Cropping of small regions fails]

Submitter:  Lee Kelvin <leeskelvin>
Submitted:  Thu 19 Jan 2017 05:21:21 PM UTC
   
 
Category:  Crop Priority:  5 - Normal
Severity:  4 - Important Item Group:  * Crash
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 19 Jan 2017 09:46:43 PM UTC, comment #1: 

THIS ITEM WAS REASSIGNED TO BUG #50099


Please, do not post any new comments to this item.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Thu 19 Jan 2017 05:21:21 PM UTC, original submission:  

THIS ITEM WAS REASSIGNED TO BUG #50099
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

Lee Kelvin <leeskelvin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by leeskelvin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-01-19 makhlaghi Reassign ItemGNU Astronomy Utilities, sr #109227 GNU Astronomy Utilities, bug #50099
    2017-01-19 leeskelvin Attached File- Added input.fits, #39514

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code