You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AltAz -> Galactic, with multiple observation times #5364
I have event tuples of (azimuth, altitude, time) in horizontal coordinates, which I store as 2 numpy arrays azimuth and altitude, and a list(datetime). I also have an EarthLocation where these events are observed. The number of events is on the order of 100k.
Now I'd like to transform these to galactic coordinates. I tried
ValueError: cannot specify frame attribute 'obstime' directly in SkyCoord since a frame instance was passed in
It works perfectly fine if I have just a single time, e.g. astropy.time.Time.now(). But looping over 100k events and creating a SkyCoord instance for each of them is incredibly slow, obviously.
I don't have a pull request for this, since I wonder if there is a built-in better way to do this?
I think it should work, but haven't really tried multi-d explicitly. @moritz-lotze - would you be able to try? Or alternatively give an explicit example that currently does not work, so we can check? (i.e., something we can just copy and paste)
@moritz-lotze - great to hear that it works! Do raise other issues as you find them, or send PRs with possible improvements -- this is how astropy gets better!
Activity
mhvk commentedon Sep 28, 2016
I fear this may need #5254...
astrofrog commentedon Oct 31, 2016
@mhvk - just to be clear, since #5254 is merged, do you mean this should work with the latest developer version?
mhvk commentedon Oct 31, 2016
I think it should work, but haven't really tried multi-d explicitly. @moritz-lotze - would you be able to try? Or alternatively give an explicit example that currently does not work, so we can check? (i.e., something we can just copy and paste)
mtzl commentedon Nov 1, 2016
Thanks for the ping, completely missed this. Updated to
1.3.dev16350.Ok, now the same as before, trying to convert (alt, az, time) tuples, and it seems to work. Great!
I don't have any unittest myself to confirm that the coordinate conversion itself is correct, but I think that'd go into a different issue anyway.
Thanks a lot!
mhvk commentedon Nov 1, 2016
@moritz-lotze - great to hear that it works! Do raise other issues as you find them, or send PRs with possible improvements -- this is how astropy gets better!