Skip to main content

DAF-MIT AeroMag

dafmit-aeromag is a Python interface to the DAF-MIT AIA open flight dataset for aircraft magnetic interference compensation and MagNav research. The package currently exposes Zenodo release v3, containing the 2020 and 2021 training flights.

This is an independent project and is not affiliated with or endorsed by the dataset authors or their institutions.

English | 简体中文 | Documentation

The HDF5 files are not bundled in this repository. They are downloaded on first use into a configurable cache and verified against the checksums in the checked-in catalog.

Install

python -m pip install dafmit-aeromag

For optional xarray conversion:

python -m pip install "dafmit-aeromag[xarray]"

Quick start

from dafmit_aeromag import Dataset, Selection

data = Dataset()

# Catalog queries do not download HDF5 data.
print(data.flights()[["flight", "collection", "date"]])
print(data.segments(2005, split="train"))
print(data.field_groups(flight=2005)[["group", "name", "units"]])

frame = data.read(
    Selection(flight=2005, lines=["2004.00"]),
    columns=["mag_1_uc", "ins_lat", "ins_lon"],
)

The normalized result starts with the stable identity columns flight, line, year, doy, tt, and time. Use raw=True when a consumer needs the source fields without derived identity columns:

raw = data.read(
    [Selection.all(1002), Selection(flight=2005, tt=slice(54616, 55252))],
    columns=["mag_1_uc", "tt"],
    raw=True,
    missing="fill",
)

Selections are explicit and flight-scoped. Lines are decimal strings such as "2005.20"; time bounds are left-closed and right-open. The native tt coordinate and absolute time coordinate are alternative filters. Reads default to split="train"; pass split="holdout" for documented holdout intervals or split="all" to disable split filtering. Use segments() to inspect the source segment coverage.

Why wrap this dataset?

The source release is authoritative and remains on Zenodo, but using it directly means coordinating large HDF5 files with separate readmes, field definitions, checksums, and train/holdout segment metadata. The 2020 and 2021 files also differ in schema, and a line label does not always identify the flight file that contains it.

This package brings those concerns into one reproducible interface: a versioned catalog pins exact source files, downloads are cached and verified, selections are explicitly scoped to a flight, split selection is explicit, and normalized identity and time columns make cross-collection analysis predictable. Field groups, notes, sensor positions, and source links help users discover the data without renaming or hiding the original HDF5 fields. Use fetch() when a workflow needs direct access to a verified local HDF5 file; the upstream field definitions remain authoritative.

Data provenance and terms

The Zenodo v3 record is authoritative for the released files, checksums, and release scope. Its readme snapshot is the primary semantic reference for this catalog; the pinned upstream MagNav.jl revision is a stable, human-readable reference. The research data is subject to its own Data Sharing Agreement; that agreement is separate from this repository's MIT-licensed code. Read the provenance and terms page before using or redistributing any data-derived artifact.

Documentation

The full API and maintenance notes are published at https://dyuu7.github.io/dafmit-aeromag/ and are also available in docs/.

Development

uv sync
uv run pytest
uv run ruff check .
uv run pyright
uv run python scripts/check_i18n.py
uv run mkdocs build --strict

The project requires Python 3.10 or newer. The catalog updater fetches only Zenodo metadata and the small readme archives:

uv run python scripts/update_catalog.py
uv run python scripts/update_catalog.py --check

Release files for dafmit-aeromag 0.3.0

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

Source distribution (sdist)

Source distribution for dafmit-aeromag 0.3.0
File Size Uploaded
dafmit_aeromag-0.3.0.tar.gz 46.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dafmit-aeromag 0.3.0
File Interpreter ABI Platform
dafmit_aeromag-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 73.0 kB

Release files / dafmit_aeromag-0.3.0.tar.gz

Download URL dafmit_aeromag-0.3.0.tar.gz
Size 46.1 kB
Tags Source
SHA-256 checksum
How to use checksums
63ae5218fd120438c6a45d92a4b3a216a29095df3b5d6c94c8044962292dfb73
BLAKE2b-256 checksum
How to use checksums
3e56f17078fccea10f2d6f581935adf2da6b5a3503522e5db90575d2236584ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 9, 2026.

Transparency log

Release files / dafmit_aeromag-0.3.0-py3-none-any.whl

Download URL dafmit_aeromag-0.3.0-py3-none-any.whl
Size 26.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89e1804196bc4e6809ec7dca0e68c8b8112ebcf403afe1e8023d4da02656927f
BLAKE2b-256 checksum
How to use checksums
51aecefe17a595898abdbfa1f294e5ef36d29b45eb81c00aa4291de7ee5885db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

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