Stellarium / stellarium

Stellarium is a free GPL software which renders realistic skies in real time with OpenGL. It is available for Linux/Unix, Windows and macOS. With Stellarium, you really see what you can see with your eyes, binoculars or a small telescope.
https://stellarium.org
GNU General Public License v2.0
7.68k stars 820 forks source link

Importing sky brightness data from lightpollutionmap.info (VIIRS/DMSP, SQM/SQC) #1619

Open RebBlumstein opened 3 years ago

RebBlumstein commented 3 years ago

This is partially a question and partially a request.

For the time being: does anyone know how to convert the sky brightness data below into something usable by Stellarium? (I am >50% sure I can do this; see below) As a feature: "wouldn't it be cool" if Stellarium did this for you?

For this issue, I'm pretending that I live in Central Garage, VA, USA (I don't, but I thought the name sounded cool). Coordinates are approximately: 37.74565 N, 77.14773 W, +53m (The pictures and data may not perfectly match up, because I didn't always select the exact same location.)

Is your feature request related to a problem? Please describe. I would like to import sky brightness / light pollution data from lightpollutionmap.info . I don't know how to manually convert the data for a specific location into a format that I can enter into the config file, although one of the data points given is the approximate Bortle Class, so that may be it.

Describe the solution you'd like As a feature request, it'd be really awesome if Stellarium by default adjusted for this info, which is seemingly based on public data. (BTW, there is also time series in that data that can be seen at lighttrends.lightpollutionmap.info )

Describe alternatives you've considered For the time being, I'd just like to know how to manually input the data from that website into the configuration file. I don't know exactly how to convert the units. I see that the website gives the approximate Bortle Class, so that may be all we need.

Additional context Here's some point data (click on the map when the given overlay is loaded):

(Map Overlay: VIIRS 2020)

Radiance info (2020)
Coordinates:    37.74767, -77.14612
Value:      1.22
Elevation:  45 meters

(Given the units in the legend, this apparently means a Radiance of 1.22 10^(-9) cm^(-2) * sr^(-1)

(Map Overlay: World Atlas 2015)

Zenith sky brightness info (2015)
Coordinates 37.74767, -77.14612
SQM     20.92 mag./arc sec2
Brightness  0.462 mcd/m2
Artif. bright.  291 μcd/m2
Ratio       1.70
Bortle      class 4
Elevation   43 meters

And here's output from the "Area (circle) statistics" tool:

Radiance statistics (2020)
Pixel count 18
Sum     56.3
Area        3.15 km2
Mean        3.1304
Std. dev.   4.0519
Minimum     0.2479
Maximum     15.2389

Below are some screenshots of the data from the test location.

For the time being: does anyone know how to convert this into something usable by Stellarium?

Point Data: radiance-point zenith-point

Area (circle) statistics: radiance-circle zenith-circle

Additional screenshots on lighttrends subdomain: lighttrends-1 lighttrends-2

github-actions[bot] commented 3 years ago

Thanks for adding your first issue to Stellarium. If you have questions, please do not hesitate to contact us.

RebBlumstein commented 3 years ago

LOL, I think there's already a setting for this. If anyone can confirm, please close this.

Press F4 for "Sky and viewing options window" and there's a checkbox: f4

gzotti commented 3 years ago

"Take from loc. db" indicates there is some data in the database of named locations. Not necessarily your site. See #1586. This is an important topic but not easy to solve. The map is a good source.

The map interface may also be worked over, with some geo API if user is online.

github-actions[bot] commented 3 years ago

Thanks to @RebBlumstein for suggesting this.

RebBlumstein commented 3 years ago

As far as I can tell, that checkbox matches up with the dataset from the website.

In short, using the checkbox to override from the locations database seems to work for any place in the default locations.

However, there's zero estimation/interpolation done (as far as I can tell) when the location given is between locations in the Stellarium database.

If your location isn't in the database, then you can work around this:

  1. Go to www.lightpollutionmap.info
  2. Find your location
  3. Click on the map to get the data at your location.
  4. Enter the number listed in the Bortle (see link for info on that) row there into the "Light pollution:" box in Stellarium.

I imagine one can add this in the configuration file, but I'll have to look...

RebBlumstein commented 3 years ago

I wrote an email to the author of lightpollutionmap.info (starej@t-2.net). He is okay with having us query his API for the relevant info. I'll try to work on an implementation.

alex-w commented 2 years ago

This is a good task for the community to participate in the contribution into Stellarium. Who wants to help us?