Skip to main content

license: mit task_categories:

  • image-to-image
  • time-series-forecasting tags:
  • solar
  • heliophysics
  • astronomy
  • AIA
  • SDO
  • EUV
  • SXR
  • GOES
  • flare
  • space-weather pretty_name: "FOXES: Framework for Operational X-ray Emission Synthesis" size_categories:
  • 100K<n<1M language:
  • en datasets:
  • griffingoodwin04/FOXES-Data

FOXES: A Framework for Operational X-ray Emission Synthesis

FOXES Logo

FOXES predicts full-disk solar soft X-ray (SXR) flux and spatial patch contributions from seven-channel SDO/AIA extreme-ultraviolet images. This repository contains the Python API, data tools, training code, and evaluation workflows developed through Frontier Development Lab's Heliolab 2025.

Model demo · Dataset · Notebook walkthrough

Install

From a local checkout:

python -m pip install -e .

The package is named helio-foxes; import it as helio_foxes. For a fresh environment, editable tests, or notebook kernel setup, follow the development setup.

Predict one observation

The examples below use the same timestamps, checkpoints, and plotting settings as the saved outputs in the heliofoxes notebook. Use a registered JSOC email and download the checkpoints into the paths shown. Load the model once and reuse it for each observation.

from pathlib import Path
import matplotlib.pyplot as plt
import numpy as np
import helio_foxes

weights = Path("forecasting/trained_weights_and_normalization")
model = helio_foxes.load_model(
    weights / "updated_architecture_checkpoints" / "ComplexModel.ckpt",
    device="auto",
)
processor = helio_foxes.ObservationProcessor(
    email="you@example.com", harp_bbox_expansion=0.2,
)
observation = processor.fetch_observation("2023-07-11T01:30:00Z")
result = model.predict(observation)

print(f"Predicted XRS-B: {result.flux:.3e} W/m²")
if observation.sxr is not None:
    print(f"Measured XRS-B: {observation.sxr['xrsb_flux']:.3e} W/m²")

fig, ax = plt.subplots(figsize=(10, 7))
helio_foxes.plot_flux_map(
    result, ax=ax, show_harp_boxes=True, min_harp_flux=1e-7,
)
plt.show()

Saved notebook output for 2023-07-11 at 01:30 UTC:

Predicted XRS-B: 2.695e-06 W/m²
Measured XRS-B: 2.941e-06 W/m²

Complex Gaussian patch flux map with HARP active-region boxes for 2023-07-11 at 01:30 UTC

Inspect the AIA inputs

Plot the seven processed channels from the same observation:

fig, axes = plt.subplots(2, 4, figsize=(14, 7), constrained_layout=True)
for ax, wavelength, image in zip(
    axes.flat, observation.metadata.wavelengths, observation.data,
):
    low, high = np.percentile(image, [1, 99])
    ax.imshow(image, origin="lower", cmap="gray", vmin=low, vmax=high)
    ax.set_title(f"AIA {wavelength} Å")
    ax.axis("off")
for ax in axes.flat[len(observation.metadata.wavelengths):]:
    ax.axis("off")
plt.show()

Seven processed AIA input channels for 2023-07-11 at 01:30 UTC

Compare checkpoints

Reuse the same observation to compare the three notebook checkpoints:

checkpoints = {
    "Complex Gaussian": weights / "updated_architecture_checkpoints" / "ComplexModel.ckpt",
    "Lighter Gaussian": weights / "updated_architecture_checkpoints" / "SlightlyLighterModel.ckpt",
    "Deterministic": weights / "inverted-attention-mask.ckpt",
}
for name, checkpoint in checkpoints.items():
    predictor = helio_foxes.load_model(checkpoint, device="auto")
    prediction = predictor.predict(observation)
    print(f"{name}: {prediction.flux:.3e} W/m²")
    del predictor
Checkpoint Saved prediction (W/m²)
Complex Gaussian 2.695 × 10⁻⁶
Lighter Gaussian 2.947 × 10⁻⁶
Deterministic 2.899 × 10⁻⁶

The measured GOES XRS-B flux at the same time is 2.941 × 10⁻⁶ W/m², using GOES-16 and GOES-18. These are individual notebook examples.

Fetching downloads and preprocesses AIA data and obtains supplementary HARP regions and GOES measurements. Raw downloads are temporary. Missing HARP or GOES data do not discard a usable AIA observation.

Already have data? See loading your own processed arrays or local FITS files. Inputs must match the checkpoint's training preprocessing and wavelength order: [94, 131, 171, 193, 211, 304, 335] Å.

Predict a time range

observations = processor.iter_observations(
    "2024-03-23 00:45", "2024-03-23 02:45",
    cadence="1min", progress=True, save_dir="saved_observations",
    on_error="skip",
)
series = model.predict_series(
    observations, snapshot_time="2024-03-23 01:45", snapshot_wavelength=193,
)
ax = series.plot(
    show_snapshot=True, show_uncertainty=True, min_peak_flux=1e-7, legend="auto",
)
plt.show()

totals = series.to_dataframe()
harp_curves = series.harp_light_curves()  # {HARP number: DataFrame}

Using the Complex Gaussian model loaded above, the saved notebook run produced 121 predictions. The flux-map and AIA panels show the retained snapshot at 2024-03-23 01:45 UTC.

HARP light curves from 2024-03-23 00:45 to 02:45 UTC alongside the flux map and AIA 193 angstrom snapshot at 01:45 UTC

*Shading and regional ± values show the model's variance attribution; they are not calibrated yet.

The iterator downloads and preprocesses observations one at a time. Existing saved files are reused, so rerunning a range skips completed downloads and preprocessing. AIA record selection uses a bulk JSOC query.

snapshot_time keeps the nearest observation's AIA channel for the flux-map and image panels. Omit it to retain no image; use series.plot() for curves only. Gaussian models show uncertainty when available; deterministic models do not.

Reload saved observations without downloading or preprocessing again:

saved = helio_foxes.load_observations("saved_observations")
series = model.predict_series(saved)
series.plot()

See the API guide for timestamp formats, cadence, source toggles, snapshot selection, uncertainty, plot controls, and saved data.

Models and documentation

The repository includes the original deterministic models and newer local + global Gaussian checkpoints. The newer checkpoints have not yet been validated for prediction quality, spatial maps, or uncertainty calibration. Patch and HARP uncertainties attribute global model variance; they are not calibrated local error bars.

After editing installed source, restart an existing notebook kernel and rerun the setup cell so it loads the current API.

Citation

If you use this code or data in your work, please cite:

@software{FOXES,
    title           = {{FOXES: A Framework For Operational X-ray Emission Synthesis}},
    institution     = {Frontier Development Lab (FDL)},
    repository-code = {https://github.com/griffin-goodwin/FOXES},
    version         = {v1.0},
    year            = {2026}
}

Acknowledgement

This work is a research product of Heliolab (heliolab.ai), an initiative of the Frontier Development Lab (FDL.ai). FDL is a public–private partnership between NASA, Trillium Technologies (trillium.tech), and commercial AI partners including Google Cloud and NVIDIA. Heliolab was designed, delivered, and managed by Trillium Technologies Inc., a research and development company focused on intelligent systems and collaborative communities for Heliophysics, planetary stewardship and space exploration. We gratefully acknowledge Google Cloud for extensive computational resources and NVIDIA Corporation. This material is based upon work supported by NASA under award number No. 80GSFC23CA040. Any opinions, findings, conclusions or recommendations expressed are those of the authors and do not necessarily reflect the views of the National Aeronautics and Space Administration.

Large language models were used as brainstorming tools to discuss possible training strategies and methodological considerations. The authors retained full responsibility for all research decisions, interpretations, and conclusions presented in this work.

Metadata

Release files for helio-foxes 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for helio-foxes 1.0.5
File Size Uploaded Provenance Actions
helio_foxes-1.0.5.tar.gz 146.9 kB With provenance Details for helio_foxes-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for helio-foxes 1.0.5
File Interpreter ABI Platform Actions
helio_foxes-1.0.5-py3-none-any.whl Python 3 none any Details for helio_foxes-1.0.5-py3-none-any.whl

Total release size: 273.2 kB

Release files / helio_foxes-1.0.5.tar.gz

Download URL helio_foxes-1.0.5.tar.gz
Size 146.9 kB
Tags Source
SHA-256 checksum
How to use checksums
003bbcf21c62d729257a988d3c1086973fb3ebcfc0f3abb3f62ce35483a61040
BLAKE2b-256 checksum
How to use checksums
d1cab43fc9df78e752943f26fd18132fafb9b1a6575998060fe499a20a8f1575
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Release files / helio_foxes-1.0.5-py3-none-any.whl

Download URL helio_foxes-1.0.5-py3-none-any.whl
Size 126.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1bb919584f1a8d0ab9720cfb28c5d02876e33c2b58c0ca783ae2ea14e9029cb
BLAKE2b-256 checksum
How to use checksums
25c71ce6c23d182bbf41b5db7e85ec5682e801b7b52b008239090aab9f7bad93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

Security for helio-foxes 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for helio_foxes-1.0.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page