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.62k stars 818 forks source link

On click sky surface brightness value #3668

Open Krukarius opened 6 months ago

Krukarius commented 6 months ago

Is your feature request related to a problem? Please describe.

When we click on any star or the Sun, we have its visual brightness in magnitude. Noticed, that this magnitude is computed even if the Sun goes below the horizon. At a solar depression of about 2 degrees, the magnitude value starts to increase rapidly despite the airmass extinction, which I don't understand why. Later it disappears completely. My problem is a lack of knowledge about the twilight brightness at any stage of twilight.

Describe the solution you'd like We have nothing shown when clicking on any part of the sky. I am wondering about the option of displaying the sky surface brightness at the given time of the day considering the standard atmosphere and its brightness against the:

Describe alternatives you've considered There is no other alternative. I am looking for a decent formula for computing it

Additional context I could map the sky surface brightness value based upon computations such as these.

gzotti commented 6 months ago

We stop extinction computations near -2° because (1) the model does not deliver them (see Fig. 19.6 in the User Guide) but (2) this is usually irrelevant, given real horizon cover for observers on the ground.

This has been suggested before (#1404). "Clicking somewhere in the sky" will usually select the nearest star, though. Meanwhile we have 2 skylight models. Preetham+Schaefer, and ShowMySky. There are notable differences.

github-actions[bot] commented 6 months ago

Hello @Krukarius!

Thank you for this suggestion.

Krukarius commented 6 months ago

Hi Georg,

Yes, I mean the Show My Sky, where this feature could be applied. Would it take long time to develop?

Thank you in advance for your reply,

Best regards,

On Thu, 14 Mar 2024 at 13:30, github-actions[bot] @.***> wrote:

Hello @Krukarius https://github.com/Krukarius!

Thank you for this suggestion.

— Reply to this email directly, view it on GitHub https://github.com/Stellarium/stellarium/issues/3668#issuecomment-1997466255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJSEHXLL6V66BV2NSVJIINLYYGQ7JAVCNFSM6AAAAABEWBU6UOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXGQ3DMMRVGU . You are receiving this because you were mentioned.Message ID: @.***>

gzotti commented 6 months ago

@10110111 ? For the older skylight model I think some value can be produced without too much trouble. But I still did not find time to check the numbers. In #1404 somebody seems to have implemented a solution in his private fork. Meanwhile we should compare the numbers between both models and against some scientific papers, and thereby find why some "magic scaling values" must be different.

Krukarius commented 6 months ago

This code says only a little to me to be fair. I would rather see these formulas standalone in some publications if possible.

10110111 commented 6 months ago

In https://github.com/Stellarium/stellarium/issues/1404 somebody seems to have implemented a solution in his private fork.

The solution seems to only be concerned with light pollution, not any other sources of skylight.

As for ShowMySky, it must be noted that it doesn't simulate airglow, instead doing some hacks similar to those in the Preetham model code.

I would rather see these formulas standalone in some publications if possible.

It's not trivial, because the actual formulas used in the ShowMySky model are those required for simulation (the results being cached in textures). Some references to the paper used as the base for the implementation can be seen here. The input for these formulas though is variable, and it's different from the atmosphere parameters used in the paper.

Finally, yes it's possible to implement computation of luminance of a given direction in the sky, just as it's currently done for the luminance of zenith to enable computation of exposure. But it needs someone capable of coding to find some free time for this.