astroplan icon indicating copy to clipboard operation
astroplan copied to clipboard

moved moon_altaz to the non-location get_moon

Open kvyh opened this issue 9 years ago • 3 comments

This is a follow-up to #213 and removes the location kwarg from the get_moon call inside Observer.moon_altaz and uses the array for the following .alt, .az, and .distances.

kvyh avatar Aug 05 '16 09:08 kvyh

I left this out of #213 on purpose, because the moon alt/az will be more affected by an observer's location on the Earth than the moon phase. So I intended to leave this method as it is until astropy/astropy#5216 is merged, and then we can fix this method. Sorry I didn't explain that in #213.

bmorris3 avatar Aug 05 '16 14:08 bmorris3

The transformation to alt/az coordinates still uses the location. If this isn't changed, the MoonIlluminationConstraint needs to be rewritten, since it ends up calling Observer.moon_altaz which is currently still really slow for array times.

kvyh avatar Aug 05 '16 15:08 kvyh

As I understand it, there's no issue with the general idea here. It doesn't matter what frame you transform from, the alt-az coordinate of the moon will be the same as long as the original coordinate points at the moon.

So using get_moon with no location and transforming to the correct alt_az frame makes sense.

StuartLittlefair avatar Aug 21 '16 19:08 StuartLittlefair