astropy / astroplan

Observation planning package for astronomers – maintainer @bmorris3
https://astroplan.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
199 stars 109 forks source link

Add night sky brightness calculator #29

Open cdeil opened 9 years ago

cdeil commented 9 years ago

This is similar to #27 by @ejeschke, but I'm making a new issue because what I propose here is a larger and probably post-GSoC project.

What really matters for observing is the night-sky brightness in the target direction, not just the moon phase or separation to the moon.

There's models for the contribution from scattered moonlight:

It would be great to have some night sky brightness calculator implemented in astroplan. I don't know if there's a really simple model that can be implemented in a day, or if they are all complex.

eteq commented 9 years ago

:+1: to this in principal.

This is a pretty big job to do right, though, because it's highly wavelength-dependent. For example at CTIO, the sky varies by ~2 mag from the blue to red sides of just the optical, but on the blue end it can easily be 5 mags from new to full moon.

More broadly, it might be useful to make this a part of a full sky brightness calculator that includes both moon and site-specific sky brightness (which would need to be provided/customizable by the user).

bmorris3 commented 8 years ago

I hear that @yoachim has suggestions for how to do this, since he has implemented similar functionality for LSST. Any comments @yoachim?

yoachim commented 8 years ago

Did someone say sky brightness model? Here's the model for LSST: https://github.com/lsst/sims_skybrightness hHere's a notebook showing it in action: https://github.com/lsst/sims_skybrightness/blob/master/doc/Sky_Model_demo.ipynb

It's mostly interpolating a set of spectra from the ESO calculator, plus an analytic model I made for twilight.

cdeil commented 8 years ago

I guess no-one wants to duplicate this in astroplan, right?

In that case, how about adding a section "related packages" to the astroplan docs and pointing people to the LSST code?

yoachim commented 8 years ago

What we really need is for ESO to open source the code behind this web page: http://www.eso.org/observing/etc/bin/gen/form?INS.MODE=swspectr+INS.NAME=SKYCALC

I'm pretty sure the code was written in a way that it could be modified to other locations (and elevations), but they haven't exposed that on the web API.

It wouldn't be too painful to just use the ESO calculator for a few select pointings and fit some simple functions to the sky brightness for a set of filters.