Removing location kwarg from moon illumination/phase computations by bmorris3 · Pull Request #213 · astropy/astroplan · GitHub
Skip to content

Removing location kwarg from moon illumination/phase computations#213

Merged
bmorris3 merged 2 commits into
astropy:masterfrom
bmorris3:fix-issue-211
Aug 5, 2016
Merged

Removing location kwarg from moon illumination/phase computations#213
bmorris3 merged 2 commits into
astropy:masterfrom
bmorris3:fix-issue-211

Conversation

@bmorris3

@bmorris3 bmorris3 commented Aug 4, 2016

Copy link
Copy Markdown
Contributor

This PR removes the location keyword argument from the moon_illumination, moon_phase_angle functions in the moon module.

The motivation here is that astropy's get_moon does not yet support computations for multiple times at a non-geocentric observer, so we were calculating each moon position with a slow for loop (astropy/astropy#5216). While the location of the observer on the surface of the Earth matters a lot if you want precise moon positions on the celestial sphere, it doesn't affect the result much for computing moon phase/illumination compared to a geocentric observer. So we can get vast speed-ups if we just drop the location specification here, where it doesn't matter much.

I've simply removed the location keyword argument, which now computes all phases/illuminations from GCRS=(0, 0, 0).

cc @StuartLittlefair @eteq @kvyh

@StuartLittlefair

Copy link
Copy Markdown
Contributor

@bmorris3

bmorris3 commented Aug 4, 2016

Copy link
Copy Markdown
Contributor Author

I'm going to wait until at least tomorrow to merge. This should also help speed up your constraint computations when the moon illumination is evaluated.

@kvyh kvyh mentioned this pull request Aug 4, 2016
@bmorris3 bmorris3 merged commit 235db81 into astropy:master Aug 5, 2016
@jcurbo

jcurbo commented Jan 20, 2017

Copy link
Copy Markdown

Hi, it looks like when you removed the location requirement you didn't update the docstrings, so the generated docs (see here) still say you need to include a location. Looks like a straightforward change (remove two lines).

Also the same for moon_phase_angle.

@bsipocz bsipocz mentioned this pull request Feb 2, 2017
@bsipocz

bsipocz commented Feb 2, 2017

Copy link
Copy Markdown
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants