These are chat archives for astropy/astropy

7th
Apr 2017
Gregory Green
@gregreen
Apr 07 2017 00:05
I've put a Gist up here that demonstrates my timings: https://gist.github.com/gregreen/7921bcc1f2c09fdccf570cf520aa942b
Erik Tollerud
@eteq
Apr 07 2017 06:13
@gregreen - I'm pretty sure this is because almost all of the cost right now in SkyCoord is taken up in creating the object. There's a lot of stuff that happens when a new SkyCoord is created, regardless of how its created... Some of which is probably ripe for improving. There's some work afoot to try to fix that, though. Have you tried this with master? When I try your gist in master, I get that the SkyCoord random is 1 ms, and random+ reshape is ~2 ms with the latest master... That's still consistent with the dominant term being the "create SkyCoord" part, but it's both progress in that it's about 15x faster and the reshape is now only ~2x slower instead of 3x...
you might also try using larger arrays to see the behavior: if I use (200, 100, 30) instead of (20, 10, 3), it's down to 1.3x (although I'm a bit surprised that it's not even lower in that case...)
matrixbot
@matrixbot
Apr 07 2017 06:22
Cadair @eteq what you doing awake at this time of day?! :p
Gregory Green
@gregreen
Apr 07 2017 07:22
@eteq - Thanks for looking into this. I'll give the master branch a try in the morning.
Gregory Green
@gregreen
Apr 07 2017 07:33
@eteq - By the way, I've noticed that SkyCoord.transform_to is slow as well, even when transforming to the frame that the SkyCoord is already in (i.e., no real transformation). I assume that's also because a new SkyCoord object is created, right?
Erik Tollerud
@eteq
Apr 07 2017 13:34
@Cadair - I blame HST proposals (which are due today...) ;)
matrixbot
@matrixbot
Apr 07 2017 13:34
Cadair haha, I assumed you were travelling somewhere!
Erik Tollerud
@eteq
Apr 07 2017 13:35
To space! (Figuratively)
matrixbot
@matrixbot
Apr 07 2017 13:35
Cadair :D
Erik Tollerud
@eteq
Apr 07 2017 13:35
@gregreen - yes, I think so. (Not 100% sure, but that's pretty likely)