<h2>You would like to do some <a href="https://astronomy.stackexchange.com/q/23165/7982">Viewing “Diamond Fuji”</a>!</h2>

<p>Using Python and <a href="https://rhodesmill.org/skyfield/" rel="nofollow noreferrer">Skyfield</a> and the GPS coordinates in your urls:</p>

<pre><code>Mt_Fuji  = earth + Topos(latitude_degrees    =  +35.36304,
                         longitude_degrees   = +138.73040,
                         elevation_m         =  3776.0)

Enoshima = earth + Topos(latitude_degrees    =  +35.29875,
                        longitude_degrees    = +139.47457,
                        elevation_m          =  10.0)
</code></pre>

<p>I get the following. <strong>I make no guarantees!</strong> </p>

<pre><code>Mt. Fuji peak from Enoshima
azimuth:     276.23 
altitude       2.86
</code></pre>

<p><a href="https://i.sstatic.net/PTpEl.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/PTpEl.png" alt="Sunset over Mt. Fuji from Enoshima"></a></p>

<p><a href="https://i.sstatic.net/r3t8h.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/r3t8h.png" alt="Sunset over Mt. Fuji from Enoshima"></a></p>

<pre><code>import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load  = Loader('~/Documents/fishing/SkyData')  # single instance for big files
ts    = load.timescale()
de421 = load('de421.bsp')
sun   = de421['sun']
earth = de421['earth']
moon  = de421['moon']

Mt_Fuji  = earth + Topos(latitude_degrees    =  +35.36304,
                         longitude_degrees   = +138.73040,
                         elevation_m         =  3776.0)

Enoshima = earth + Topos(latitude_degrees    =  +35.29875,
                        longitude_degrees    = +139.47457,
                        elevation_m          =  10.0)

hours  = 17 - 9 + np.arange(91)/60.

days   = np.arange(1, 367)

alt_Fuji, az_Fuji, d_Fuji = Enoshima.at(ts.now()).observe(Mt_Fuji).apparent().altaz()
alt_Fuji, az_Fuji         = [thing.degrees for thing in (alt_Fuji, az_Fuji)]
d_Fuji_km                  = d_Fuji.km

Mt_Fuji_obs = Enoshima.at(ts.now()).observe(Mt_Fuji).apparent()

if True:
    seps = []
    for day in days:
        times = ts.utc(2019, 1, day, hours)
        sunpos  = Enoshima.at(times).observe(sun).apparent()
        Fujipos = Enoshima.at(times).observe(Mt_Fuji)
        sep     = Fujipos.separation_from(sunpos)
        seps.append(sep)

    sepz = [x.degrees for x in seps]
    SEP  = np.array(sepz)

    if True:
        plt.figure()
        plt.imshow(SEP, vmin=0, vmax=5)
        plt.colorbar()
        plt.xlabel('minutes after 17:00 JST', fontsize=14)
        plt.ylabel('day number in 2019 JST', fontsize=14)
        plt.title('Sun sep (deg) from Mt. Fuji from Enoshima', fontsize=14)
        plt.show()

# make a detailed plot
if True:
    days_1   = np.arange( 95, 100)   # april 5 thru 9
    days_2   = np.arange(246, 251)   # sept  3 thru 7
    both = []
    for days in (days_1, days_2):
        altazs = []
        for day in days:
            times = ts.utc(2019, 1, day, hours)
            alt, az, d = Enoshima.at(times).observe(sun).apparent().altaz()
            alt, az    = [thing.degrees for thing in (alt, az)]
            altazs.append((alt, az))
        both.append(altazs)

    if True:
        hw_deg         = 5.0
        altmin, altmax = alt_Fuji - hw_deg, alt_Fuji + hw_deg
        azmin,  azmax  = az_Fuji  - hw_deg, az_Fuji  + hw_deg
        xFuji = [az_Fuji - 2*alt_Fuji, az_Fuji,  az_Fuji + 2*alt_Fuji, az_Fuji - 2*alt_Fuji]
        yFuji = [0,                    alt_Fuji, 0,                    0                   ]
        plt.figure()
        for i, altazs in enumerate(both):
            plt.subplot(2, 1, i+1)
            for (alt, az) in altazs:
                plt.plot(az, alt)
            plt.plot(xFuji, yFuji, '-k', linewidth=2)
            plt.plot([azmin, azmax], [0, 0], '-k')
            plt.xlim(azmin, azmax)
            plt.ylim(altmin, altmax)
            plt.ylabel('altitude(deg)', fontsize=14)

        plt.xlabel('azimuth (deg)', fontsize=14)
        plt.suptitle('Sunset vs Mt. Fuji from Enoshima', fontsize=14)
        plt.show()
</code></pre>

CC BY-SA 4.0
2019-04-06T13:36:04.840Z
Pointing me to skyfield would have been enough for an accepted answer, so… thanks for doing all the footwork. Sadly, it was pretty hazy, so I didn't even go to to Enoshima but took pictures from a bit further away/more north. https://i.sstatic.net/JIiLp.jpg One question though: wouldn't it be better to call .altaz('standard') to have at least some correction for atmospheric refraction? Not that it makes a big difference.
Caesar
CC BY-SA 4.0
2019-04-06T23:36:42.890Z
@Caesar Oh that is beautiful, thank you so much for sharing the photo! :-) The idea behind Stack Exchange is to write answers that not only help the OP, but will possibly be helpful to future readers as well. Perhaps someone else decides to learn python, or adopt Skyfield by seeng what it can do. It would be great if you posted your photo in a new answer, calculated for the new lat-lon, and showed the comparison, of course in your "spare time" ;-)
uhoh
CC BY-SA 4.0
2019-04-06T23:38:36.637Z
@Caesar About `.atlaz()`, I started using Skyfield from an early version, and have never read through the documentation. I'd thought that ``standard`` was the default, even going so far as to use `.altaz(pressure_mbar=0)` to *turn off* /refraction [here](https://space.stackexchange.com/a/35143/12102). So posting the script not only keeps me in practice but brings in helpful comments like yours. Thanks!
uhoh
CC BY-SA 4.0
2019-03-27T12:20:16.060Z
2019-03-27T12:39:14.353Z
2019-03-27T12:39:14.353Z
uhoh
<p>My attempt at an answer of my own question. I have no confidence that it is correct, and I'd like to know whether there's an easier way to do this…</p>

<p><a href="https://www.movable-type.co.uk/scripts/latlong.html" rel="nofollow noreferrer">https://www.movable-type.co.uk/scripts/latlong.html</a> tells me that the bearing is 90.3°.</p>

<p>A quick application of middle school trigonometry tells me that the visible elevation of Fuji is about 3413 m or 2.90°.</p>

<p>Next, I went to Stellarium, fixed my position to Enoshima, and exported the Ephemeris (F10 menu) of the Sun in a 5 minute intervals with horizontal coordinates from February till May.</p>

<p>Finally, I used a quick python script to find the line in the Ephimeris export where the sun is closest to my desired coordinates (90.3°, 2.9°)</p>



<pre><code>import re
from pprint import pprint

height = "Height"
azi = "Azimut"

# Quick and dirty parser
pre = re.compile("([+-])(\\d+)°(\\d+)'([0-9.]+)\"")
def ph(v):
    m = pre.match(v)
    if m:
        sign, *nums = m.groups()
        return sum([float(s) * 60 ** (-e) for e,s in enumerate(nums)]) * float(sign + "1")
    try:
        return float(v)
    except:
        pass
    return v

res = []
with open('ephemeris2.csv') as f:
    head = next(f).split(", ")
    for line in f:
        php = [ph(v) for v in line.split(", ")]
        res.append(dict(zip(head, php)))

# This is where the magic happens!
filt = [k for k in res if k is not None and height in k and azi in k]
filt.sort(key = lambda v: (v[height] - 2.9) ** 2 + (v[azi] - 270.3) ** 2)
pprint(filt[:5])
</code></pre>

<p>This yielded me</p>



<pre><code>{ 'Azimut': 270.13194444444446,
  'Datum and Time': '2019-03-25 17:39:00',
  'Height': 3.0792222222222225 }
</code></pre>

<p>I'm unsure whether I can just convert the Bearing to Azimuth like that, but I suspect that a simple mathematical mistake is even more likely…</p>

CC BY-SA 4.0
2019-03-24T17:53:59.333Z
When I checked the azimuth of Mount Fuji as seen from Enoshima, I got a value of 276.2°, a bit different from yours. Which coordinates did you use for Enoshima and Mount Fuji? The elevation angle seems OK, I got 2.86°
FSimardGIS
CC BY-SA 4.0
2019-03-25T14:23:43.107Z
Hm, you're right. I thought I checked the positions on the map… Anyway, the date changes to `2019-04-07 17:49:00`. But now I'm worried that that site's scripts don't consider earths varying radius.
Caesar
CC BY-SA 4.0
2019-03-25T16:33:34.080Z
I'm not sure I understand what you mean, do you refer to the fact that Earth is a spheroid (squashed sphere)? I have done the calculation using the WGS84 spheroid and 2.9° is the correct elevation angle for the line of sight. The bearing is good as well. I think April 7 would be a good bet, too. The biggest uncertainty will be refraction on that day, as well as the weather :-)
FSimardGIS
CC BY-SA 4.0
2019-03-27T12:23:49.067Z
Hi @Caesar happy to see an other Python advocate! Try [this out](https://astronomy.stackexchange.com/a/30141/7982) if you get a chance.
uhoh
CC BY-SA 4.0
2019-03-23T13:27:40.707Z
2019-03-23T15:09:50.250Z
2019-03-23T15:09:50.250Z
Caesar
<p>How do I get the days in this year when the sun will set exactly on top of <a href="https://www.openstreetmap.org/#map=18/35.36304/138.73040" rel="nofollow noreferrer">Fuji</a> as viewed from <a href="https://www.openstreetmap.org/#map=21/35.29875/139.47457&amp;layers=C" rel="nofollow noreferrer">Enoshima</a>.</p>

<p>I shamefully admit that I just want to take a nice picture of Fuji.</p>

CC BY-SA 4.0
2019-09-05T23:26:29.107Z
I just ran across this article and thought you might find its XKCD wisdom fun/interesting https://gizmodo.com/the-most-extreme-way-to-take-a-selfie-according-to-xkc-1837672597
uhoh
<the-sun><observational-astronomy>
Sunset on [Mountain] from [Viewing Point]
Caesar
# Sunset on [Mountain] from [Viewing Point]

(Asked by: username_0 on 2019-03-23)

How do I get the days in this year when the sun will set exactly on top of [Fuji](https://www.openstreetmap.org/#map=18/35.36304/138.73040) as viewed from [Enoshima](https://www.openstreetmap.org/#map=21/35.29875/139.47457&layers=C).

I shamefully admit that I just want to take a nice picture of Fuji.

**Tags:** the-sun, observational-astronomy
> **Comments:**
> **username_1**: I just ran across this article and thought you might find its XKCD wisdom fun/interesting https://gizmodo.com/the-most-extreme-way-to-take-a-selfie-according-to-xkc-1837672597  

---

## 2 answers

### Answer by username_1 on 2019-03-27. Score: 3 | Accepted answer

You would like to do some Viewing “Diamond Fuji”!
Using Python and Skyfield and the GPS coordinates in your urls:
Mt_Fuji  = earth + Topos(latitude_degrees    =  +35.36304,
                         longitude_degrees   = +138.73040,
                         elevation_m         =  3776.0)

Enoshima = earth + Topos(latitude_degrees    =  +35.29875,
                        longitude_degrees    = +139.47457,
                        elevation_m          =  10.0)

I get the following. I make no guarantees! 
Mt. Fuji peak from Enoshima
azimuth:     276.23 
altitude       2.86



import numpy as np
import matplotlib.pyplot as plt
from skyfield.api import Loader, Topos

load  = Loader('~/Documents/fishing/SkyData')  # single instance for big files
ts    = load.timescale()
de421 = load('de421.bsp')
sun   = de421['sun']
earth = de421['earth']
moon  = de421['moon']

Mt_Fuji  = earth + Topos(latitude_degrees    =  +35.36304,
                         longitude_degrees   = +138.73040,
                         elevation_m         =  3776.0)

Enoshima = earth + Topos(latitude_degrees    =  +35.29875,
                        longitude_degrees    = +139.47457,
                        elevation_m          =  10.0)

hours  = 17 - 9 + np.arange(91)/60.

days   = np.arange(1, 367)

alt_Fuji, az_Fuji, d_Fuji = Enoshima.at(ts.now()).observe(Mt_Fuji).apparent().altaz()
alt_Fuji, az_Fuji         = [thing.degrees for thing in (alt_Fuji, az_Fuji)]
d_Fuji_km                  = d_Fuji.km

Mt_Fuji_obs = Enoshima.at(ts.now()).observe(Mt_Fuji).apparent()

if True:
    seps = []
    for day in days:
        times = ts.utc(2019, 1, day, hours)
        sunpos  = Enoshima.at(times).observe(sun).apparent()
        Fujipos = Enoshima.at(times).observe(Mt_Fuji)
        sep     = Fujipos.separation_from(sunpos)
        seps.append(sep)

    sepz = [x.degrees for x in seps]
    SEP  = np.array(sepz)

    if True:
        plt.figure()
        plt.imshow(SEP, vmin=0, vmax=5)
        plt.colorbar()
        plt.xlabel('minutes after 17:00 JST', fontsize=14)
        plt.ylabel('day number in 2019 JST', fontsize=14)
        plt.title('Sun sep (deg) from Mt. Fuji from Enoshima', fontsize=14)
        plt.show()

# make a detailed plot
if True:
    days_1   = np.arange( 95, 100)   # april 5 thru 9
    days_2   = np.arange(246, 251)   # sept  3 thru 7
    both = []
    for days in (days_1, days_2):
        altazs = []
        for day in days:
            times = ts.utc(2019, 1, day, hours)
            alt, az, d = Enoshima.at(times).observe(sun).apparent().altaz()
            alt, az    = [thing.degrees for thing in (alt, az)]
            altazs.append((alt, az))
        both.append(altazs)

    if True:
        hw_deg         = 5.0
        altmin, altmax = alt_Fuji - hw_deg, alt_Fuji + hw_deg
        azmin,  azmax  = az_Fuji  - hw_deg, az_Fuji  + hw_deg
        xFuji = [az_Fuji - 2*alt_Fuji, az_Fuji,  az_Fuji + 2*alt_Fuji, az_Fuji - 2*alt_Fuji]
        yFuji = [0,                    alt_Fuji, 0,                    0                   ]
        plt.figure()
        for i, altazs in enumerate(both):
            plt.subplot(2, 1, i+1)
            for (alt, az) in altazs:
                plt.plot(az, alt)
            plt.plot(xFuji, yFuji, '-k', linewidth=2)
            plt.plot([azmin, azmax], [0, 0], '-k')
            plt.xlim(azmin, azmax)
            plt.ylim(altmin, altmax)
            plt.ylabel('altitude(deg)', fontsize=14)

        plt.xlabel('azimuth (deg)', fontsize=14)
        plt.suptitle('Sunset vs Mt. Fuji from Enoshima', fontsize=14)
        plt.show()

> **Comments:**
> **username_0**: Pointing me to skyfield would have been enough for an accepted answer, so… thanks for doing all the footwork. Sadly, it was pretty hazy, so I didn't even go to to Enoshima but took pictures from a bit further away/more north. https://i.sstatic.net/JIiLp.jpg One question though: wouldn't it be better to call .altaz('standard') to have at least some correction for atmospheric refraction? Not that it makes a big difference.  
> **username_1**: @Caesar Oh that is beautiful, thank you so much for sharing the photo! :-) The idea behind Stack Exchange is to write answers that not only help the OP, but will possibly be helpful to future readers as well. Perhaps someone else decides to learn python, or adopt Skyfield by seeng what it can do. It would be great if you posted your photo in a new answer, calculated for the new lat-lon, and showed the comparison, of course in your "spare time" ;-)  
> **username_1**: @Caesar About `.atlaz()`, I started using Skyfield from an early version, and have never read through the documentation. I'd thought that ``standard`` was the default, even going so far as to use `.altaz(pressure_mbar=0)` to *turn off* /refraction [here](https://space.stackexchange.com/a/35143/12102). So posting the script not only keeps me in practice but brings in helpful comments like yours. Thanks!  

---

### Answer by username_0 on 2019-03-23. Score: 3

My attempt at an answer of my own question. I have no confidence that it is correct, and I'd like to know whether there's an easier way to do this…
https://www.movable-type.co.uk/scripts/latlong.html tells me that the bearing is 90.3°.
A quick application of middle school trigonometry tells me that the visible elevation of Fuji is about 3413 m or 2.90°.
Next, I went to Stellarium, fixed my position to Enoshima, and exported the Ephemeris (F10 menu) of the Sun in a 5 minute intervals with horizontal coordinates from February till May.
Finally, I used a quick python script to find the line in the Ephimeris export where the sun is closest to my desired coordinates (90.3°, 2.9°)
import re
from pprint import pprint

height = "Height"
azi = "Azimut"

# Quick and dirty parser
pre = re.compile("([+-])(\\d+)°(\\d+)'([0-9.]+)\"")
def ph(v):
    m = pre.match(v)
    if m:
        sign, *nums = m.groups()
        return sum([float(s) * 60 ** (-e) for e,s in enumerate(nums)]) * float(sign + "1")
    try:
        return float(v)
    except:
        pass
    return v

res = []
with open('ephemeris2.csv') as f:
    head = next(f).split(", ")
    for line in f:
        php = [ph(v) for v in line.split(", ")]
        res.append(dict(zip(head, php)))

# This is where the magic happens!
filt = [k for k in res if k is not None and height in k and azi in k]
filt.sort(key = lambda v: (v[height] - 2.9) ** 2 + (v[azi] - 270.3) ** 2)
pprint(filt[:5])

This yielded me
{ 'Azimut': 270.13194444444446,
  'Datum and Time': '2019-03-25 17:39:00',
  'Height': 3.0792222222222225 }

I'm unsure whether I can just convert the Bearing to Azimuth like that, but I suspect that a simple mathematical mistake is even more likely…

> **Comments:**
> **username_2**: When I checked the azimuth of Mount Fuji as seen from Enoshima, I got a value of 276.2°, a bit different from yours. Which coordinates did you use for Enoshima and Mount Fuji? The elevation angle seems OK, I got 2.86°  
> **username_0**: Hm, you're right. I thought I checked the positions on the map… Anyway, the date changes to `2019-04-07 17:49:00`. But now I'm worried that that site's scripts don't consider earths varying radius.  
> **username_2**: I'm not sure I understand what you mean, do you refer to the fact that Earth is a spheroid (squashed sphere)? I have done the calculation using the WGS84 spheroid and 2.9° is the correct elevation angle for the line of sight. The bearing is good as well. I think April 7 would be a good bet, too. The biggest uncertainty will be refraction on that day, as well as the weather :-)  
> **username_1**: Hi @Caesar happy to see an other Python advocate! Try [this out](https://astronomy.stackexchange.com/a/30141/7982) if you get a chance.  

---

