Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to parse ds9 line region text file #1129

Closed
kswang1029 opened this issue Jun 16, 2022 · 2 comments · Fixed by #1135
Closed

unable to parse ds9 line region text file #1129

kswang1029 opened this issue Jun 16, 2022 · 2 comments · Fixed by #1135
Assignees
Labels
bug Something isn't working

Comments

@kswang1029
Copy link
Contributor

Describe the bug
From the ds9 manual (https://ds9.si.edu/doc/ref/region.html), a line region can be defined as
line x1 y1 x2 y2 # line=[0|1] [0|1]
where the line=[0|1] [0|1] part is to enable/disable arrow heads at the two ends

When we have such arrow head definition in the region text file, CARTA cannot parse the line region properly with an error message as "polygon syntax error, odd number of arguments.".

test data attached
tmp.zip

To Reproduce
Steps to reproduce the behavior:

  1. download the test data
  2. load the image
  3. check the region info. there are two line regions with the first one (can be loaded in CARTA) commented out
  4. load the region and we will see the error: polygon syntax error, odd number of arguments.

Expected behavior
ds9 line region with such arrow head decoration should still be loaded successfully in CARTA.

Platform info (please complete the following information):

  • OS [e.g. macOS Monterey]: macOS Monterey
  • Browser [e.g. chrome, safari, electron app]: chrome, electron app
  • Browser version [e.g. 22]: chrome 102
  • Backend branch [e.g. dev, v3b2 release]: dev, v3b3
  • Frontend branch [e.g. dev, v3b2 release]: dev, v3b3
@kswang1029 kswang1029 added the bug Something isn't working label Jun 16, 2022
@kswang1029
Copy link
Contributor Author

This is reported by a v3b3 tester. @pford @markccchiang do you have time to investigate this?

@pford pford self-assigned this Jun 16, 2022
@kswang1029
Copy link
Contributor Author

Thank you @pford 🙂

confluence pushed a commit that referenced this issue Jun 28, 2022
* Fix DS9 region import with line arrow properties (ignored)

* Add DS9 parsing for point shape size

* Update changelog description

* Fix DS9 polygon import error messages to include line

* Fix DS9 point properties with no size

Co-authored-by: Pam Harris <pharris@nrao.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants