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

rounding errors in world coordinates of exported polyline region as ds9 format #953

Closed
kswang1029 opened this issue Oct 28, 2021 · 1 comment · Fixed by #974
Closed

rounding errors in world coordinates of exported polyline region as ds9 format #953

kswang1029 opened this issue Oct 28, 2021 · 1 comment · Fixed by #974
Assignees
Labels
bug Something isn't working
Milestone

Comments

@kswang1029
Copy link
Contributor

kswang1029 commented Oct 28, 2021

if a polyline is exported as casa format in world coordinate, we see

#CRTFv0 CASA Region Text Format version 0
polyline [[17:56:21.67061, -021.57.16.6090], [17:56:21.69974, -021.57.21.6747], [17:56:21.56575, -021.57.19.4053], [17:56:21.57449, -021.57.23.8226], [17:56:21.48419, -021.57.22.9715], [17:56:21.49001, -021.57.25.6867]] coord=J2000, corr=[I], linewidth=2, linestyle=-, symsize=1, symthick=1, color=2ee6d6, font=Helvetica, fontsize=10, fontstyle=bold, usetex=false

However, if the format is ds9 we see

#Region file format: DS9 CARTA 3.0.0-beta.1b
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
fk5
polyline(269.0903, -21.9546, 269.0904, -21.9560, 269.0899, -21.9554, 269.0899, -21.9566, 269.0895, -21.9564, 269.0895, -21.9571) # color=#2EE6D6 width=2

As this is in degree, we will need more digits to prevent rounding errors.

Screen Shot 2021-10-28 at 11 37 53 AM

@kswang1029 kswang1029 added the bug Something isn't working label Oct 28, 2021
@pford
Copy link
Collaborator

pford commented Oct 28, 2021

This is likely an issue with other DS9 regions as well, such as polygon.

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.

3 participants