Skip to content

Comments

DS9 for python3#1

Merged
MacDaddy1660B merged 2 commits intoApachePointObservatory:mainfrom
pavolgaj:main
Jan 30, 2026
Merged

DS9 for python3#1
MacDaddy1660B merged 2 commits intoApachePointObservatory:mainfrom
pavolgaj:main

Conversation

@pavolgaj
Copy link
Contributor

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
Contributor 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.

@MacDaddy1660B
Copy link
Contributor

@pavolgaj , sorry, been tied up here and I still haven't gotten around to testing this out. I plan to soon. Thanks for your contribution.

@MacDaddy1660B MacDaddy1660B merged commit 63272e9 into ApachePointObservatory:main Jan 30, 2026
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