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.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-py3-none-any.whl (19.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shield_data-0.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.tar.gz
Algorithm Hash digest
SHA256 b0843e658d73545d5402968ff991634f0d08acc383df0b1b0b036f81e4c399a0
MD5 b69dbe4cb0103d41788b5889bbfe43e2
BLAKE2b-256 d8b58bc574cd9886028f6c274ace487ec7d6bd0fefc563bc9eb2b492f19f328b

See more details on using hashes here.

Provenance

The following attestation bundles were made for shield_data-0.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-py3-none-any.whl.

File metadata

  • Download URL: shield_data-0.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-py3-none-any.whl
Algorithm Hash digest
SHA256 c385b6b8722c137c129529935bf17d732ba43fbdd02449130744b7c876bc977f
MD5 3e96648dab526480e907c59d3a285409
BLAKE2b-256 f51752d4eb9470dd32f95f0d80e708f986a851894c01e5e9904fd5f5333cbc13

See more details on using hashes here.

Provenance

The following attestation bundles were made for shield_data-0.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