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

DM-7886: pyfits to astropy #136

Merged
merged 5 commits into from Jul 11, 2018
Merged

DM-7886: pyfits to astropy #136

merged 5 commits into from Jul 11, 2018

Conversation

timj
Copy link
Member

@timj timj commented Jul 6, 2018

No description provided.

@timj timj requested review from PaulPrice and r-owen July 6, 2018 21:49
Copy link
Contributor

@r-owen r-owen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. One optional suggested change to clean up an existing issue.

@@ -249,8 +249,8 @@ def main(dataDir, visit, title="", outputTxtFileName=None,
plt.axis([-20000, 20000, -20000, 20000])

def frameInfoFrom(filepath):
import pyfits
with pyfits.open(filepath) as hdul:
from astropy.io import fits
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider moving this import to the top of the file. It's more standard and easier to find there. Also I think main always calls frameInfoFrom.

timj added 5 commits July 11, 2018 08:10
Astropy prefers that pyfits name is only used for large codebases
that were built with pyfits. In this case there are only a couple
of lines to edit so use the modern form.
It is always going to be imported so we use the standard location.
@timj timj force-pushed the tickets/DM-7886-obs_subaru branch from 04ee37d to ecb1b8f Compare July 11, 2018 15:20
@timj timj merged commit ecb1b8f into master Jul 11, 2018
@ktlim ktlim deleted the tickets/DM-7886-obs_subaru branch August 25, 2018 06:45
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.

None yet

2 participants