bugGNU Astronomy Utilities - Bugs: bug #61967, DS9 polygon region files not read...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #61967: DS9 polygon region files not read when width and color are set

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Tue 01 Feb 2022 12:32:01 AM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Item Group:  Crash Status:  Fixed
Privacy:  Public Assigned to:  pedram
Open/Closed:  Closed

Fri 04 Feb 2022 03:37:59 PM UTC, comment #3: 

Pedram fixed this bug in task #16115.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Tue 01 Feb 2022 05:52:11 PM UTC, comment #2: 

I am working on this bug in task #16115 (I didn't see this bug before defining it). So, please let me know if it works as expected.

Pedram Ashofteh-Ardakani <pedram>
Group Member
Tue 01 Feb 2022 12:33:13 AM UTC, comment #1: 

I forgot to mention that after manually removing the '# color=black width=4' part of the last line, the problem is fixed!

Zahra Sharbaf helped in finding the solution to this bug.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Tue 01 Feb 2022 12:32:01 AM UTC, original submission:  

When a region file is visually made with DS9 and the user gives it a non-standard width or color, the region file can't be read by Gnuastro, with an error like this:


$ astcrop image.fits --polygon=ds9.reg
astcrop:ds9.reg:4: line with polygon vertices doesn't end with ')'. It is expected for the line to have this format: 'polygon(AAA,BBB,...)'. Where 'AAA' and 'BBB' are numbers and '...' signifies that any number of points are possible


This happens because in such cases, DS9 appends the line with the 'polygon(...)' definition with '# color=CCCCC width=XXXX'. For example, here is the basic region file that caused the error above (after changing the width and color of the region):


$ cat ds9.reg
# Region file format: DS9 version 4.1
global color=green dashlist=8 3 width=1 font="helvetica 10 normal roman" select=1 highlite=1 dash=0 fixed=0 edit=1 move=1 delete=1 include=1 source=1
image
polygon(505.48874,678.30722,595.26462,678.30722,595.26462,588.53135,505.48874,588.53135) # color=black width=4


We should allow the code that reads the region file to allow anything after the closing parenthesis of 'polygon(...)'.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

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

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 pedram (Posted a comment)
  • -email is unavailable- added by makhlaghi (Submitted the item)
  • -email is unavailable- added by makhlaghi
  •  

    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.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-04 makhlaghi StatusPostponed Fixed
        Assigned toNone pedram
        Open/ClosedOpen Closed
    2022-02-01 makhlaghi Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code