Skip to main content

A database for results collected from the SHIELD permeation rig

Project description

SHIELD-Data

CI codecov Code style: Ruff DOI

A Python package providing experimental permeation data from the SHIELD hydrogen permeation rig.

Overview

SHIELD-Data bundles experimental data in an SQLite database for easy access and analysis. The package includes:

  • 826,000+ measurements from 8 experimental runs
  • SQLite database for efficient querying and filtering
  • Simple API for loading data and metadata
  • Bundled with pip install - no external data downloads needed

Installation

pip install shield-data

Quick Start

import shield_data as sd

# View all available runs
cat = sd.catalogue()
print(cat[["run_id", "date", "furnace_setpoint"]])

# Load data from a specific run
df = sd.load("25.10.06_run_1_10h41")

# Load all runs at 500K
df_500k = sd.load_filtered(furnace_setpoint=500)

# Get run metadata
metadata = sd.load_metadata("25.10.06_run_1_10h41")
print(metadata["run_info"])

API Reference

catalogue()

Load the catalogue of all experimental runs.

cat = sd.catalogue()
# Returns DataFrame with columns:
#   run_id, date, start_time, run_type, furnace_setpoint, material, coating

load(run_id)

Load pressure gauge data for a specific run.

df = sd.load("25.10.06_run_1_10h41")
# Returns DataFrame with columns:
#   timestamp, WGM701_voltage, CVM211_voltage,
#   Baratron626D_1KT_voltage, Baratron626D_1T_voltage, run_id

load_metadata(run_id)

Load metadata for a specific run.

metadata = sd.load_metadata("25.10.06_run_1_10h41")
# Returns dict with keys: version, run_info, gauges, thermocouples

load_filtered(**filters)

Load data for runs matching filter criteria.

# Filter by temperature
df = sd.load_filtered(furnace_setpoint=500)

# Filter by run type and date
df = sd.load_filtered(run_type="permeation_exp", date="2025-10-06")

# Multiple runs combined into single DataFrame

Example Analysis

import shield_data as sd
import matplotlib.pyplot as plt

# Load all 500K experiments
df = sd.load_filtered(furnace_setpoint=500)

# Plot pressure over time for each run
for run_id in df["run_id"].unique():
    run_data = df[df["run_id"] == run_id]
    plt.plot(
        run_data.index,
        run_data["Baratron626D_1T_voltage"],
        label=run_id
    )

plt.xlabel("Measurement Number")
plt.ylabel("Downstream Pressure (V)")
plt.legend()
plt.title("500K Permeation Experiments")
plt.show()

Data Structure

Database Schema

The SQLite database contains two tables:

runs table:

  • run_id (TEXT, PRIMARY KEY)
  • date (TEXT)
  • start_time (TEXT)
  • run_type (TEXT)
  • furnace_setpoint (INTEGER)
  • material (TEXT, nullable)
  • coating (TEXT, nullable)
  • metadata (TEXT, JSON)

measurements table:

  • id (INTEGER, PRIMARY KEY)
  • run_id (TEXT, FOREIGN KEY)
  • timestamp (TEXT)
  • WGM701_voltage (REAL)
  • CVM211_voltage (REAL)
  • Baratron626D_1KT_voltage (REAL)
  • Baratron626D_1T_voltage (REAL)

Run Metadata

Each run includes detailed metadata:

  • Run information (type, date, furnace setpoint)
  • Gauge configurations (4 pressure gauges)
  • Valve timing information
  • Recording parameters

Repository Structure

SHIELD-Data/
├── run_data/                     # Raw data (not in package)
│   ├── YY.MM.DD_run_X_HHhMM/    # Individual run folders
│   │   ├── pressure_gauge_data.csv
│   │   └── run_metadata.json
│   └── ...
├── src/shield_data/
│   ├── db.py                     # Main API
│   ├── build_db.py               # Database builder
│   └── shield_data.db            # SQLite database (98 MB)
└── test/                         # Unit tests

Contributing

Adding New Data

When adding new experimental runs:

  1. Add run folder to run_data/YY.MM.DD_run_X_HHhMM/
  2. Rebuild database (required):
    python src/shield_data/build_db.py
    
  3. Commit both new data AND updated shield_data.db
  4. Submit PR (see CONTRIBUTING.md)

Note: PRs adding data without rebuilding the database will not be merged.

Development

To rebuild the database from raw data:

from shield_data.build_db import build_database

build_database("run_data")  # Creates src/shield_data/shield_data.db

Requirements

  • Python >= 3.9
  • pandas

License

Apache License 2.0

Citation

If you use this data in your research, please cite:

@software{shield_data_2025,
  author = {Dark, James},
  title = {SHIELD-Data: Hydrogen Permeation Experimental Data},
  year = {2025},
  doi = {10.5281/zenodo.17544506},
  url = {https://github.com/PTTEPxMIT/SHIELD-Data}
}

Contact

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

shield_data-0.2.2.tar.gz (34.3 MB view details)

Uploaded Source

Built Distribution

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

shield_data-0.2.2-py3-none-any.whl (19.1 MB view details)

Uploaded Python 3

File details

Details for the file shield_data-0.2.2.tar.gz.

File metadata

  • Download URL: shield_data-0.2.2.tar.gz
  • Upload date:
  • Size: 34.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shield_data-0.2.2.tar.gz
Algorithm Hash digest
SHA256 94e38402ff21a67742457e991634a40ddea9509369e31110dbfbc64c7a795ad6
MD5 44d7719f70c4e885ca71006269f3d2f6
BLAKE2b-256 cc70cce3bd334d76cefd44f5d584f3da4360467239494fb9d08dada1d02dff2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for shield_data-0.2.2.tar.gz:

Publisher: python-publish.yml on PTTEPxMIT/SHIELD-Data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shield_data-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: shield_data-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 19.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shield_data-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6694d6599984fdbf337895879429f258dfe94d50cfc7c5139fb872595e83350
MD5 8fd65b8423eacb58c920c7644ac00e08
BLAKE2b-256 d3bfe8e7aae01a0c8c964ffcca65dbf7b55f50d82d403a3d8387301e92a98f0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for shield_data-0.2.2-py3-none-any.whl:

Publisher: python-publish.yml on PTTEPxMIT/SHIELD-Data

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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