# tlohde

because i can't afford a geochron

19:06 22/10/2025
666 words
contents

i can't afford a what?

what am i going to do about it?

what i did about it

skip to the output. No offense taken.

Firstly, work out how to plot the terminator. A bit of time searching for libraries that can do it out of the box, then some translating, followed by working out what exactly their code was doing. Secondly, realise that cartopy has a nice implementation: Nightshade, and that I just wasted an hour or so.

Next, establish that the terminator cartopy generates plays nicely with cartopy's projection capabilities, naturally. Great. Then it's just a case of wasting another hour or so trying to add the bands for civil, nautical and astronomical twilight [6], before realising that the refraction parameter of Nightshade can be used as an

adjustment in degrees due to refraction, thickness of the solar disc, elevation[7] etc...

Bingo. Just run Nightshade a few times with different refraction and alpha values.

Nightshade(date, alpha=0.5)
Nightshade(date, alpha=0.4, refraction=-18.0)
Nightshade(date, alpha=0.3, refraction=-12.0)
Nightshade(date, alpha=0.2, refraction=-6.0)

Slap the timestamp in the corner[8]. And job done.

Wrong.

add a bit of complexity that definitely doesn't speed it up

Pick a random projection each time, customising the projection such that the central_longitude and central_latitude (if applicable) parameters are set to the lat, lon of the where the sun is directly over head. Oh, and whilst we're playing with those lat lon values, might as well plot them as a little yellow * on the map.

also add:

Right. How do I change the desktop background? And can I remember how to use cron, or is it crontab? Who knows.

gsettings set org.gnome.desktop.background picture-uri file:///path/to/file/now.png

&

@reboot /usr/bin/env bash /path/to/script/changeDesktop.sh
*/5 * * * * /usr/bin/env bash /path/to/script/changeDesktop.sh

apparently

That didn't do it. Wait. Yes it did. The probelm was the not activating my conda environment in that script. Fixed. Done.

the world map in the Spilhaus projection. The upper right half, (Asia, Europe and much of Africa) is in relative darkness (night). The line between day and night is a smooth curve. Antarctica, in the middle of the map is in daylgiht, along with the Americas, which are heavily distorted due to the projection and wrap around the left and bottom edge of the frame. There are three progressively lighter bands between the night and day, indicating cival, nautical and astronomical twilight. These bands cross Greenland, western edges of Europe, west Africa and Eastern Australia.
⛶↗  Fig 0: my desktop background for the five minutes from 18:25:48+00:00 on 22nd October 2025. Note the little yellow star - that's our sun.

hopefully

having a steady stream of different projections put in front of me, means I might inadvertantly learn their names. Maybe even learn to distinguish EckertI from EckertII.

upgrades

a nicer base map. at some point. or maybe even some live[9] images of a EUMETSAT or somewhere.

footnotes


  1. amongst other things ↩︎

  2. ugh. gross. no ↩︎

  3. with what skills? ↩︎

  4. ditto ↩︎

  5. bingo ↩︎

  6. at 0°-6°, 6°-12°, and 12°-18° below horizon respectively ↩︎

  7. my emphasis ↩︎

  8. in ISO 8601 with UTC+00:00 ↩︎

  9. NRT ↩︎


have thoughts? want to share? email me, or find me on mastodon where you can reply to this post