Switch monthly phase close-ups to NASA SVS Dial-a-Moon at fullscreen
The previous east-flavored composite (tight-crop east region + lunar texture overlay) was honest but visually limited: 38-px source moon, no real terminator shadows on quarters, and a faint upscaled-halo background that was less compelling than just a clean lunar render. New flow: - East stays the witness (verifies the moon was visible during the collection window) and supplies the timestamp. - moon_dialamoon.py fetches the NASA SVS Dial-a-Moon render for that exact UTC hour. Free, public-domain, real-physics: correct phase, libration, and crater shadows for any timestamp. - moon_composite.render_phase_closeup() places that render at ~92% of frame height on a 1920x1080 black background -- the long-telephoto look the user asked for. - One API call per phase event (~36/year), cached forever in moon-ref/dialamoon/. Quarter moons now show real 3D crater shadows along the terminator, which the prior algorithmic phase-shadow couldn't simulate from a full-moon reference. Adds MOON_REQUIRE_EAST_VERIFY=true|false toggle so the user can choose "only post when east saw it" (default, current behavior) vs "post every cycle regardless of weather over east." Drops the install-time lunar reference download (no longer needed) and the now-unused per-phase phase-shadow path stays in moon_composite.py for reference / future reuse. https://claude.ai/code/session_015PBVDESC3KLMbq1LpA6qLn
This commit is contained in:
+5
-19
@@ -243,25 +243,11 @@ if [ "${MOON_TRACK_ENABLED:-true}" = "true" ] || [ "${MOON_FULL_ENABLED:-true}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Lunar reference texture for moon_phase_monthly.py. Default URL is the
|
||||
# Wikipedia "FullMoon2010" by Gregory H. Revera (CC BY-SA 3.0), 3500×3500.
|
||||
# Override MOON_REFERENCE_URL in .env to use a different source — any
|
||||
# high-res photo of a full moon on a black background works.
|
||||
ref_dir="${MOON_REFERENCE_DIR:-$HERE/moon-ref}"
|
||||
ref_path="${MOON_REFERENCE_PATH:-$ref_dir/full-moon.jpg}"
|
||||
ref_url="${MOON_REFERENCE_URL:-https://upload.wikimedia.org/wikipedia/commons/e/e1/FullMoon2010.jpg}"
|
||||
if [ ! -f "$ref_path" ]; then
|
||||
mkdir -p "$(dirname "$ref_path")"
|
||||
echo "Downloading lunar reference texture..."
|
||||
if curl -fsSL -o "$ref_path" "$ref_url"; then
|
||||
echo " ok → $ref_path"
|
||||
else
|
||||
echo " WARNING: lunar reference download failed"
|
||||
echo " Drop a high-res full-moon JPEG at $ref_path manually,"
|
||||
echo " or set MOON_REFERENCE_URL in .env and re-run install.sh."
|
||||
rm -f "$ref_path"
|
||||
fi
|
||||
fi
|
||||
# NASA SVS Dial-a-Moon images are fetched on demand by moon_dialamoon.py
|
||||
# the first time each phase event is processed (~once per phase per month,
|
||||
# ~36 calls/year), cached forever in moon-ref/dialamoon/. No bulk
|
||||
# download needed at install time.
|
||||
mkdir -p "${MOON_DIALAMOON_CACHE_DIR:-$HERE/moon-ref/dialamoon}"
|
||||
fi
|
||||
|
||||
# Nightly moon-track job — runs on the SUNRISE_CAM only.
|
||||
|
||||
Reference in New Issue
Block a user