2

I am trying to get the apparent magnitude of the Sun at various locations on Earth using PyEphem. When I change different locations on Earth or even change the time the apparent magnitude of the Sun remains the same. This doesn't make any sense because I changed one of the times to night. What's wrong here?

I believe mag is the right function for me. If not, do you know how I could do this: get the apparent magnitude or illuminance of the Sun at various spots of Earth at varying times?

>>> gatech = ephem.Observer()
>>> gatech.lon = '-84.39733'
>>> gatech.lat = '33.775867'
>>> gatech.elevation = 320
>>> gatech.date = '2017/6/19 16:22:56' #Changing the time here does nothing.
>>> v = ephemeral.Sun(gatech)
>>> print(v.mag)

1 Answers1

0

The magnitude of a celestial object does not change as it dips below the horizon and then later rises again. If you are asked the magnitude of Sirius, for example, you can answer that it is -1.46 without stopping to check whether it is above or below your particular horizon at the moment. It is the same with the Sun: “what is its magnitude” is a question about its properties as visible to whomever can see it, and does not vary with any particular observer.

Brandon Rhodes
  • 83,755
  • 16
  • 106
  • 147
  • I see thanks, I misunderstood its usage. But do you know how I can get the illuminance of the sun with respect to some observer at a particular location and time? – not_this_website Jun 22 '17 at 08:38
  • It would requiring modeling things like how the atmosphere refracts at different altitudes and seasons of the year. You might take a look at a program that needs to render the sun realistically in an animated sky, like Stellarium or FlightGear, and see what formulae they have worked out for determining how bright the disc of the sun would be? – Brandon Rhodes Jun 23 '17 at 12:07