[AstroPy] Effect of observer elevation on sunset time

Wilfred Tyler Gee wtylergee at gmail.com
Sat May 9 14:45:13 EDT 2020


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20200509/bc962626/attachment-0001.html>


More information about the AstroPy mailing list