Skip to content

Release v2.1

Latest

Choose a tag to compare

@chaunceygardiner chaunceygardiner released this 10 Aug 17:47

weewx-skyfield 2.1

The almanac serves comets — any comet the Minor Planet Center tracks,
added to weewx.conf by designation, with Halley configured out of the
box — and rounds out the almanac's measure of time and distance: moon
perigee/apogee tags with a supermoon callout on the Sky page, solar
time and the equation of time, unit-aware AU distance tags, and an
illumination percent tag. Drop-in upgrade from 2.0 — install over
it, no configuration changes needed; the installer adds the
[[Comets]] entry and fetches the first elements.

What's new

  • Comet tags. [Skyfield] [[Comets]] in weewx.conf maps tag
    names to MPC designations — the installer writes the two comets
    everybody knows, halley = 1P and hale_bopp = C/1995 O1 (the 1997
    great comet, ~49 AU out and receding — a distance the almanac table
    watches grow), and the README carries a ready-to-paste block of other
    famous comets (Encke, the Rosetta comet, 2024's Tsuchinshan-ATLAS…).
    Add the comet everyone is talking about as, say,
    tsuchinshan_atlas = C/2023 A3, and each entry serves the almanac's
    full planet-style surface: $almanac.halley.rise/.set/.transit
    and the whole next_/previous_ family, alt/az and every ra/dec
    flavor, distance/distance_from_sun (with the raw AU floats),
    elongation, visible, illumination, the constellation it stands
    in, and mag — the MPC total magnitude from the published g/k
    parameters, with a documented caveat: comets are notorious for
    deviating from it, so treat it as expectation, not measurement.
    There is deliberately no pass machinery — a comet rises and sets
    daily, like a planet — and comet tags never fall through to PyEphem,
    which has no comets. Elements are the MPC's CometEls.txt, one small
    file for every comet with a current orbit, cached beside the
    satellite TLEs and refreshed about every two days on a worker thread
    — atomically, the old file kept on any failure — with
    comet_downloads = false as the isolated-network switch, same story
    as the satellites. A comet the MPC drops from the file (they retire
    comets that have faded from observability) serves honest "N/A" tags
    with a log warning naming it, never an error, and
    $almanac.halley.elements_epoch/.elements_age stay live as
    diagnostics.

    And none of it needs pandas. Skyfield's own comet loader is built on
    pandas DataFrames, so this extension constructs the orbits against
    Skyfield's core directly — comets, like the bundled 118,218-star
    Hipparcos catalog, work with nothing extra installed.

  • Comets everywhere they belong on the Sky page. A comet rides
    every roster panel: a row in the almanac table, a brass-dotted chip
    in the rail (whose eyebrow then reads "Sun, Planets & Comets"), a
    brass bar on the rise & set ribbons, and —
    $almanac.halley.perihelion being a tag now — a countdown chip in
    the header whenever a configured comet's perihelion lies ahead
    within a year: the news-cycle countdown. A comet without elements
    is honestly absent from all of them.

  • Comets on the dome — and the orrery. A configured comet above
    the horizon plots on the dome as a labeled diamond with a small
    anti-sunward tail — comet tails point away from the sun, so the
    glyph is honest physics as well as iconography — always: the config
    list is the filter. Solid brass when its magnitude says
    plausibly naked-eye (6.0 or brighter), a hollow ring when fainter —
    there, but not visible to the eye, the same visual language as a
    satellite in Earth's shadow — with the magnitude in the tooltip and
    the footer crediting the Minor Planet Center. And the Solar System
    panel plots every configured comet at its current sun distance and
    heliocentric longitude, horizon or no horizon — the panel that shows
    a news-cycle comet falling sunward, inside Jupiter's ring, inside
    Earth's, as the report cycles pass (marker only, no orbit ring: an
    eccentric orbit does not draw as a circle). Halley, the shipped
    default, is the hollow ring until the 2060s. For embedding skins,
    $sky_page.comet_names() joins satellite_names() as a public
    contract, and the dome diamond's data-bright="1|0" joins
    data-sunlit as a live-layer hook.

    The orrery with Halley and Hale-Bopp

  • Meteor showers. The almanac knows the dozen major annual
    showers of the IMO working list, each peak computed from the sun's
    ecliptic longitude — the Perseids peak when the sun reaches 140.0°,
    whatever the calendar says — so nothing is looked up and nothing
    needs annual maintenance. $almanac.next_meteor_shower serves the
    shower next ahead (name, translated label, peak time, ZHR, radiant
    position with live alt/az, and the parent body — the Perseids are
    comet 109P/Swift-Tuttle's trail), and
    $almanac.active_meteor_showers lists what's active now. The Sky
    page's countdown row always carries the next shower with the moon's
    peak-night illumination as the honest interference judgment — this
    year's Perseids peak, August 12, lands on a new moon: a dark-sky
    year, and the chip says so — and during a shower's activity the dome
    marks its radiant with a rayed glyph, ZHR and peak date in the
    tooltip. Shower names are translated in all nine bundled languages.

  • Earth's perihelion and aphelion. $almanac.next_perihelion and
    $almanac.next_aphelion (with previous_ twins) — Earth's closest
    and farthest approach to the sun, early January and early July,
    matching the published instants within a minute. Closest in the
    depth of northern winter: the seasonal misconception-buster, now an
    almanac fact.

  • Moon perigee and apogee. $almanac.moon.next_perigee,
    .previous_perigee, .next_apogee and .previous_apogee — the
    times of the moon's closest and farthest approach, found on the
    geometric center-to-center distance, the definition the published
    apsis tables use, and reproducing them to the minute. A supermoon's
    headline number is one time-travel away:
    $almanac(almanac_time=$almanac.moon.next_perigee.raw).moon.distance.km.

  • $almanac.next_supermoon. The supermoon rule as a tag: the
    instant of the next full moon falling within a day of perigee,
    searched forward full moon by full moon. One field for a live
    page's supermoon countdown; the Sky page's callout reads it too.

  • A supermoon callout on the Sky page. The lunation panel now ends
    with the quiet next-perigee/next-apogee line — and, whenever the next
    full moon falls within a day of perigee, a brass Supermoon
    callout above it. Like the satellite pass cards, it is anticipation:
    it appears ahead of the event and leaves with it. (The next one:
    December 23, 2026 — full moon and perigee seven hours apart.)

    The lunation panel with its apsis footer

  • Solar time and the equation of time. $almanac.solar_time is
    local apparent solar time — what a sundial reads — as an angle like
    sidereal_time (180° is solar noon), with $almanac.solar_angle its
    unit-aware twin; $almanac.equation_of_time is a signed duration
    ValueHelper, apparent minus mean solar time per the USNO sign
    convention (positive with the sundial ahead of the clock, about
    +16 minutes in early November). Values agree with Meeus within a few
    seconds across the year, and the sign convention is documented in
    "Differences from PyEphem", since published sources disagree on it.
    And the Sky page charts it: a new Equation of Time panel beside the
    Solar Year chart — the classic double-humped curve, week by week at
    the analemma's own noon instants, with today's value on the brass
    point.

    The equation of time panel

  • Unit-aware distances. $almanac.mars.distance (from Earth,
    mirroring the satellites' .distance) and
    $almanac.mars.distance_from_sun are ValueHelper twins of the raw AU
    floats earth_distance/sun_distance: "1.8588 AU" by default in
    every unit system, converting on ask ($almanac.moon.distance.km).
    The astronomical_unit unit registers with WeeWX in its own group,
    group_distance_astronomical, so skins can restyle the whole family
    through [Units]. Stars with a measured Hipparcos parallax serve
    the twins too; a star without one honestly reads "N/A".

  • illumination. $almanac.venus.illumination is the ValueHelper
    twin of the raw percent-illuminated phase float (and of the moon's
    moon_fullness), rendering with the report's percent formatting.

Requirements

  • WeeWX 5.2 or later
  • Python 3.9 or later
  • Skyfield 1.47 or later, and NumPy — and still no pandas
  • For live-updating pages (optional): weewx-loopdata 6.9 or later and
    weewx-celestial 8.1 or later.

Installing/upgrading

Download weewx-skyfield.zip
and install with weectl, then restart WeeWX:

sudo -- bash -c ". /home/weewx/weewx-venv/bin/activate; weectl extension install weewx-skyfield.zip -y"

Upgrading from 2.0 (or any 1.x) is a drop-in: install over the old
version; no configuration changes are needed. The installer adds the
comet_downloads and [[Comets]] entries to [Skyfield] and fetches
the first comet elements; on an isolated network, set
comet_downloads = false (comet tags then read "N/A" unless you
maintain the one element file yourself — see the README).