Skip to main content

Probabilistic space-weather driver forecasting: F10.7 and Kp forecasts with walk-forward-calibrated uncertainty bands, plus orbital-drag translation — pure Python.

Project description

penumbra-toolkit

Probabilistic space-weather driver forecasting for Python: forecast the F10.7 solar radio flux and the Kp geomagnetic index with calibrated uncertainty bands, verify that calibration with a leakage-free walk-forward backtest, and translate the uncertainty into orbital-drag risk.

Extracted from PENUMBRA, where the same code powers a live dashboard over the public NOAA feeds. The phase-2 companion to kessler-toolkit.

pip install penumbra-toolkit

What's inside

Module Purpose
series Parse NOAA F10.7 / Kp, aggregate Kp→daily Ap, align and gap-fill daily series
f107_forecast Persistence + mean-reversion point forecast with empirical quantile bands
kp_forecast Recency-weighted geomagnetic storm-category probabilities + Ap band
calibration Leakage-free walk-forward backtest, coverage, pinball loss, skill, reliability
drag F10.7 band → thermospheric density → in-track orbit-decay uncertainty

Quick start

import numpy as np
from penumbra_toolkit import (
    DailySeries, walk_forward_errors, forecast, coverage, skill_vs_reference,
)

# a daily F10.7 history (dates + values)
history = DailySeries(dates, values)

# learn the out-of-sample error distribution, then forecast with calibrated bands
bt = walk_forward_errors(history, lead_days=45, min_train=400)
fc = forecast(history, 45, bt.error_quantiles)

print(fc.point[6], fc.bands[5][6], fc.bands[95][6])   # 7-day point + 90% band
print(coverage(bt)[0])                                # empirical vs target coverage
print(skill_vs_reference(bt)[0])                      # skill vs persistence baseline

Every uncertainty band is learned from real out-of-sample forecast errors — calibrated by construction if the backtest is leakage-free, which is enforced by test. Drag translation is a reduced, order-of-magnitude model (not a high-fidelity propagation).

Apache-2.0. Space-weather data used with PENUMBRA courtesy of NOAA SWPC and GFZ Potsdam.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

penumbra_toolkit-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

penumbra_toolkit-0.1.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file penumbra_toolkit-0.1.0.tar.gz.

File metadata

  • Download URL: penumbra_toolkit-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.7

File hashes

Hashes for penumbra_toolkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9cdb78778b123c29cc8dbea0a7ce70389210c3ce2d909b29f673d43a424a004d
MD5 02a5046f70a1e418dc4d33501be0d9ed
BLAKE2b-256 e813a12fed6c6d12e0a0d263eae15289ee8cc721f16a9dc52db5b56a6f712e09

See more details on using hashes here.

File details

Details for the file penumbra_toolkit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for penumbra_toolkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4802c73a648cf7aae681289de88214b139097b3d91f0bc50a90fcdfed6f0db
MD5 2f649ff5c298c6310026bd0129a5b64b
BLAKE2b-256 666ffdea4b5892a873862df49be1b4fd3520aee7ac912aa3dd04009af07785f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page