-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Use astropy.coords in nrao module #67
Conversation
This won't test against @astrofrog's |
I'll let both travis builds finish (a few hours) then make some decisions and see if we can't get both of these merged. |
@keflavich I just saw #16 . You can close that one when you merge this. |
I think that you can merge #64 first, that way when this gets merged in it will get tested and we can then address any failures. |
@cdeil - would it be easy for you to rebase and push so we can re-test? |
Merged #64, so rebase against master now? |
Rebased. |
I restarted the travis build; I think on a rebase, there's no travis build trigger |
@@ -90,9 +84,15 @@ def get_nrao_image(lon, lat, system='galactic', epoch='J2000', size=1.0, | |||
if band not in valid_bands: | |||
raise ValueError("Invalid band. Valid bands are: %s" % valid_bands) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the following change OK?
I don't have the old coords
package available right now for testing and there is no unit test for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so:
In [3]: ra,dec = coords.Position((43.1,0.01),system='galactic').j2000()
In [4]: galactic = coord.GalacticCoordinates(43.1,0.01,unit=('deg','deg'))
In [5]: radec = galactic.fk5
In [10]: abs(radec.ra.degrees - ra) * 3600
Out[10]: 0.14393172129985032
In [11]: abs(radec.dec.degrees - dec) * 3600
Out[11]: 0.21757954918086853
so the answers differ by <1", which may be the limit of accuracy for one package or the other.
@keflavich Eventually there is a travis build when a rebase is pushed, but sometimes it doesn't start right away and it only shows up on the github UI once it's finished. |
Before there was an `import *` and I got confused.
@keflavich @astrofrog Do you understand the travis test failures here ? E.g. https://travis-ci.org/astropy/astroquery/jobs/6316304 shows the KeyError with threading. |
No, @astrofrog? I posted the same issue on #64, so I don't think it's an issue with this PR - I'm happy to merge this now. |
I'm just going to quickly diagnose the issue with python 3 string/unicode |
OK, @astrofrog, merge when you're satisfied then |
The unicode/string issue is actually a big in the error display in astropy's master (and 0.2.1) but if I use a locally fixed version, building's @cdeil's branch gives:
which is the source of the error. Actually I see the same issue in master, so I guess this PR isn't the cause of the error. |
The threading error is actually a symptom of another failure - that there are warnings in the docs build. So if you can get rid of those warnings, the threading error will disappear. |
I think we should try and fix these before merging, but I'm out of time. Just for info, to get the proper error for the first case, you need to be running Python 3, and change
to
in |
@astrofrog - have you promoted these to astropy issues? I'd prefer to merge this, then have other issues pointing back to these problems, since this PR is not responsible for either of those bugs (I think #64 is the one actually responsible). The doc errors also deserve their own issue. All that said, I'll leave it open for now - I'm not really in a huge hurry, I just think this is not the right forum for those issues. |
@keflavich - just to clarify, the bugs in Astropy (which I think are both reported, will check tomorrow) are hiding two real issues in the package, but feel free to address them in a separate pull request. But you should be able to fix them here such that the tests pass, the bugs in Astropy are just in the actual errors themselves, not the fact an error is raised. |
Since nothing in this PR breaks builds, but removing |
Use astropy.coords in nrao module
removed setuptools_bootstrap.py as it doesn't exist any more
I haven't tested this (my tests fail locally because of an independent issue) ... please review ... and let's see what travis-ci has to say.