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

DS9 for python3 #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

pavolgaj
Copy link

I just made some modifications to the DS9.py file to work under python3 with PyGuide - show the image in SAO DS9.

@MacDaddy1660B
Copy link
Contributor

Hi,

Please detail the following:

  1. What exactly are we fixing here?
  2. What other applications have we tested this fix with?

Thank you!

@pavolgaj
Copy link
Author

I fixed loading array from PyGuide to DS9 - using DS9.showArray function. Numpy function array.tofile is slightly different in py3 compare to py2. Changes are mostly caused by encoding and string representation (as bytes in py3). So, it's better to use file.write(array.tobytes()) instead of it. And on other 2 places there were also some problems with encoding.

Generally, the fix is in usage DS9.showArray in python 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants