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

[WIP] Some Python 2 -> Python 3 changes to get the rawfits demo to work #12

Closed
wants to merge 1 commit into from

Conversation

gully
Copy link
Contributor

@gully gully commented Apr 28, 2020

To whom it may concern,
Hi! 👋
Thank you for maintaining NSDRP 🎉

I encountered some error messages (omitted) while running the NSDRP rawfits demo from the documentation.

nsdrp.py -oh_filename /path/to/ir_ohlines.dat /path/to/rawfits /your/output/path

I diagnosed this error message and several others as arising from a Python 2/3 incompatibility problem. The most common problems were cases of integer division, which results in integers in python 2, and floats in python 3. I replaced instances of the division operator / with the floor division operator //.

I did not check to see if these changes maintained backwards compatibility with Python 2, so I'm submitting this Pull Request as a "work in progress", so that you all can decide how best to include these changes, if at all. In the very least, users finding this Pull Request can pull these changes.

Best wishes! 📈

@gully
Copy link
Contributor Author

gully commented Apr 28, 2020

Sorry to report that my editor automatically scrubbed some whitespace, obscuring the relatively few content changes amidst a sea of irrelevant diffs. I can probably undo that if it's a pain to see the content changes, just let me know.

@gully
Copy link
Contributor Author

gully commented Apr 28, 2020

Whoops, I just noticed PR #8 which may duplicate the same Python 2 ➡️ 3 conversion... Should I start basing off of that PR rather than master as a Python3 user? Any guidance welcomed!

@gully
Copy link
Contributor Author

gully commented Apr 28, 2020

I just confirmed that PR #8 indeed had no problem with Python 3, and in fact is even faster because of the cosmic ray advances. Bravo, thank you! Closing this PR.

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.

1 participant