-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
AltAz transformation fails for vector SkyCoord #3938
Comments
Looks like it's because your location = EarthLocation('10d', '45d', 0*u.meter) or, while we're at it: location = EarthLocation(10*u.degree, 45*u.degree, 0*u.meter) you crazy people with your strings...:) |
BTW I don't know why this only happens for non-scalar |
Hmm, every other time I've used EarthLocations with a unitless elevation I haven't had issues. The EarthLocation docs say:
So I think what I typed should have worked. |
@adrn 's suggested work-around of using a unit in the height kwarg to |
@bmorris3 oops, you're right! when I tested it on my machine I used a scalar coordinate...doh |
I think the error comes from |
It appears that
Could it be possible that the default distance of |
Ah, no, it's actually that >>> combined_coords = SkyCoord(targets)
>>> print(combined_coords.representation)
astropy.coordinates.representation.SphericalRepresentation |
Hm, well, that's because the default representation is if isinstance(icrs_coo.data, UnitSphericalRepresentation): # no distance |
Investigated this a bit. Turns out the confusion is that I think the solution is to just correctly convince the new |
I'm calling a
coord.transform_to(AltAz(...))
transformation on a vector of coordinates, like this:and getting the following error:
As you can see by the
print
statement that does not fail, theSkyCoord
constructor unpacks the coordinates (which only have RA, Dec) into a vector with distances. What's that about? @eteq @cdeil @adrnThe text was updated successfully, but these errors were encountered: