[AstroPy] Effect of observer elevation on sunset time

Stuart P Littlefair s.littlefair at sheffield.ac.uk
Mon May 11 04:57:35 EDT 2020


Hi Eric,

The alt-az system reflects where a perfect theodolite would point to see
the source, so there isn't a concept of an apparent horizon in the alt-az
coordinate system.

A general correction for apparent horizon doesn't make much sense either,
since increased altitude does not necessarily lead to a lower apparent
horizon compared to a sea-level observer (for example, in mountain ranges).

But it does make a lot of sense in the context of most astronomical
observatories, so I'd think a keyword argument to astroplan's sun_set_time
would be a useful addition. Something like:

sun_set = teide.sun_set_time(now, which="next", horizon=-12*u.deg,
use_apparent_horizon=True)

On Sat, 9 May 2020 at 23:32, Eric Jensen <ejensen1 at swarthmore.edu> wrote:

> Hi all,
>
> Thanks for everyone’s comments.  To be clear, I’m not talking about
> refraction effects, but rather about the position of the “true horizon” due
> to the curvature of the Earth.  It’s the same effect as when you look up in
> the sky after sunset and see a cloud or an airplane directly overhead (so
> at the same geodetic latitude and longitude that you are) that is still lit
> by the sun.  Something higher up can see to a more distant horizon than
> something at sea level.
>
> I had noticed the github issue that Wilfred mentioned (thanks!), but I
> hadn’t read it carefully enough - now I see that it does indeed discuss
> this, though the person raising the issue ultimately gets around it by
> calculating the correction for the true horizon himself, and applying that
> correction by using the true horizon’s elevation (-2 degrees relative to
> the uncorrected horizon) to find the true time of sunset.
>
> So it’s clear that that correction isn’t applied.  So I guess my question
> now is, why not?  It seems more practical to me, at least for the sun,
> since it’s the elevation relative to the true horizon that determines how
> dark it is.
>
> I could see this being added as an option to sun_set_time (and I can look
> into making a PR if others think it’s useful), but I’d still be interested
> in hearing any thoughts about why it isn’t the default behavior.  Is the
> altitude in the alt-az coordinate system formally defined as being that for
> an observer at zero elevation?
>
> Thanks again,
>
> Eric
>
>
> On May 9, 2020, at 2:45 PM, Wilfred Tyler Gee <wtylergee at gmail.com> wrote:
>
> Hi all,
>
> This was discussed some back in
> https://github.com/astropy/astroplan/issues/242
>
> Eric, you might want to look at changing your pressure in addition to your
> elevation.
>
> On Sat, May 9, 2020 at 8:41 AM Sergio Pascual <sergio.pasra at gmail.com>
> wrote:
>
>> Hello,
>>
>> I don't have my copy of Green's Spherical Astronomy with me, but I
>> remember there is as section about the effect of height on topocentric
>> coordinates, and hence, in sun set  and rise times. The affect is about a
>> few minutes, depending on height and latitude.
>>
>> Regards
>>
>> El sáb., 9 may. 2020 a las 20:25, Stuart P Littlefair (<
>> s.littlefair at sheffield.ac.uk>) escribió:
>>
>>> I should probably think about this more before I embarrass myself but -
>>> isn’t this right?
>>>
>>> The sun is 93 million miles away so a tangential movement of a few
>>> thousand metres is going to make a negligible angular distance, no?
>>>
>>> Is the apparent difference in sunset times at high altitudes more of a
>>> refraction effect?
>>>
>>> Stuart Littlefair
>>> Dept. of Physics & Astronomy
>>> Univ. of Sheffield, Sheffield, S3 7RH
>>>
>>> email: s.littlefair at shef.ac.uk
>>> Phone: +44 114 2224525
>>> Sent from my iPhone
>>>
>>> On 9 May 2020, at 19:13, Adrian Price-Whelan <adrianmpw at gmail.com>
>>> wrote:
>>>
>>> 
>>> Hi Eric,
>>>
>>> I'm not sure yet what the root of the problem is, but it doesn't seem to
>>> be an astroplan issue - see the bottom of this notebook, which computes the
>>> difference in Sun altitude for the two elevations with astropy's AltAz
>>> frame (used internally by astroplan):
>>> https://gist.github.com/628c6ffed4f652d2278e970981f67854
>>>
>>> Erik T. might have more thoughts?
>>>
>>> best,
>>> Adrian
>>>
>>> On Sat, May 9, 2020 at 11:31 AM Eric Jensen <ejensen1 at swarthmore.edu>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I was just working with astroplan to calculate some sunset times
>>>> (actually nautical twilight in the example below), and I noticed that
>>>> specifying the observatory elevation doesn’t seem to make any difference in
>>>> the results, contrary to my expectations.
>>>>
>>>> Example code:
>>>>
>>>> from astropy.coordinates import EarthLocation
>>>> import astroplan
>>>> from astropy.time import Time
>>>> import astropy.units as u
>>>>
>>>> location = EarthLocation.from_geodetic(-16.5097*u.deg,
>>>>                                        28.3*u.deg,
>>>>                                        2390*u.m)
>>>> # Same location, but zero elevation
>>>> location_sealevel = EarthLocation.from_geodetic(-16.5097*u.deg,
>>>>                                                 28.3*u.deg,
>>>>                                                 0*u.m)
>>>> teide = astroplan.Observer(location=location,
>>>>                            name="Teide",
>>>>                            timezone="Atlantic/Canary")
>>>> teide_sealevel = astroplan.Observer(location=location_sealevel,
>>>>                                     name="Teide sea level",
>>>>                                     timezone="Atlantic/Canary")
>>>>
>>>> now = Time.now()
>>>> n = 1000
>>>> sun_set = teide.sun_set_time(now, which="next",
>>>>                              horizon=-12*u.deg,
>>>>                              n_grid_points=n)
>>>> sun_set_sealevel = teide_sealevel.sun_set_time(now, which="next",
>>>>                                                horizon=-12*u.deg,
>>>>                                                n_grid_points=n)
>>>> print("Sunset at altitude:  {0.iso}, JD: {0.jd}".format(sun_set))
>>>> print("Sunset at sea level: {0.iso}, JD:
>>>> {0.jd}".format(sun_set_sealevel))
>>>> print("Difference: {}".format((sun_set - sun_set_sealevel).to(u.s)))
>>>>
>>>> This yields the output:
>>>>
>>>> Sunset at altitude:  2020-05-09 20:41:33.933, JD: 2458979.3621982955
>>>> Sunset at sea level: 2020-05-09 20:41:33.933, JD: 2458979.3621982983
>>>> Difference: -0.00024139881134033203 s
>>>>
>>>>
>>>> i.e. basically no difference.   There are three reasons I could think
>>>> of:
>>>>
>>>> 1.  The effect of observer elevation simply isn’t implemented in
>>>> astroplan.
>>>> 2.  There’s something wrong with my code.
>>>> 3.  There’s something wrong with my thinking that there should be a few
>>>> minutes difference (later sunset / earlier sunrise) at a few thousand
>>>> meters elevation vs. at sea level.
>>>>
>>>> My guess is #1, but I’m curious to hear if others have different
>>>> thoughts.  I’m using astropy 4.0.1 and astroplan 0.6.
>>>>
>>>> Thanks,
>>>>
>>>> Eric
>>>>
>>>> _______________________________________________
>>>> AstroPy mailing list
>>>> AstroPy at python.org
>>>> https://mail.python.org/mailman/listinfo/astropy
>>>>
>>>
>>>
>>> --
>>> Adrian M. Price-Whelan
>>> Flatiron Institute, NYC
>>> http://adrn.github.io
>>> (he / him)
>>> _______________________________________________
>>> AstroPy mailing list
>>> AstroPy at python.org
>>> https://mail.python.org/mailman/listinfo/astropy
>>>
>>> _______________________________________________
>>> AstroPy mailing list
>>> AstroPy at python.org
>>> https://mail.python.org/mailman/listinfo/astropy
>>>
>> _______________________________________________
>> AstroPy mailing list
>> AstroPy at python.org
>> https://mail.python.org/mailman/listinfo/astropy
>>
>
>
> --
> ~Wilfred Tyler Gee
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>
>
> _______________________________________________
> AstroPy mailing list
> AstroPy at python.org
> https://mail.python.org/mailman/listinfo/astropy
>


-- 
Stuart Littlefair

-------------------------------------------------------

*I don't expect you to respond to my email outside your working hours. *

*At the University of Sheffield we value and encourage flexible working
patterns, so please be assured that I respect your working pattern and I am
looking forward to your response when you are next working. *

-------------------------------------------------------

Dept. of Physics & Astronomy,
Univ. of Sheffield, Sheffield, S3 7RH.

email: S.Littlefair at sheffield.ac.uk
phone: +44 114 2224525
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20200511/889717a5/attachment-0001.html>


More information about the AstroPy mailing list