Use when the user mentions 'HEPData' or asks to find experimental data, download data tables from HEP papers, get digitized plots, or retrieve cross-section measurements. HEPData contains data points behind figures in high-energy physics publications.
Search and download experimental data tables from HEPData, the high-energy physics data repository.
Requires: requests (pip install requests)
HEPData stores the actual data points behind plots and tables in HEP publications:
Data is linked to papers via INSPIRE IDs and available in multiple formats.
# Get record by HEPData ID
python scripts/hepdata.py ins1234567
# Get record by INSPIRE ID
python scripts/hepdata.py 1234567 --inspire
# Get record by arXiv ID
python scripts/hepdata.py 1907.12345 --arxiv
# List tables in a record
python scripts/hepdata.py 1234567 --inspire --tables
# Search by keywords
python scripts/hepdata.py --search "Higgs cross section"
# Search by reaction
python scripts/hepdata.py --search 'reactions:"P P --> TOP TOPBAR"'
# Search by collaboration
python scripts/hepdata.py --search "collaboration:ATLAS"
# Search by observable
python scripts/hepdata.py --search "observables:SIG"
# Limit results
python scripts/hepdata.py --search "dark matter" -n 5
reactions:"P P --> X" - Search by reactioncollaboration:NAME - Filter by collaboration (ATLAS, CMS, LHCb, etc.)observables:TYPE - Filter by observable typecmenergies:13000 - Center-of-mass energy in GeVkeywords:term - Search keywords# List available tables first
python scripts/hepdata.py 1234567 --inspire --tables
# Download specific table as CSV
python scripts/hepdata.py 1234567 --inspire --download "Table 1" --format csv
# Download all tables as YAML
python scripts/hepdata.py 1234567 --inspire --download --format yaml
# Download to specific directory
python scripts/hepdata.py 1234567 --inspire --download "Table 1" -o ./data/
csv - Comma-separated values (default)yaml - YAML format (HEPData native)json - JSON formatroot - ROOT fileyoda - YODA format (for Rivet)HEPData accepts three types of identifiers:
| Flag | Type | Example |
|---|---|---|
| (none) | HEPData ID | ins1234567 |
--inspire | INSPIRE recid | 1234567 |
--arxiv | arXiv ID | 1907.12345 |
python scripts/hepdata.py <inspire_id> --inspirepython scripts/hepdata.py <id> --inspire --tablespython scripts/hepdata.py <id> --inspire --download "Table 1" -f csv# Find ATLAS SUSY limits
python scripts/hepdata.py --search "collaboration:ATLAS SUSY exclusion"
# Download the limit data
python scripts/hepdata.py 1234567 --inspire --download "Exclusion contour" -f csv
# Find Higgs measurements
python scripts/hepdata.py --search "Higgs cross section 13 TeV"
# Download measurement table
python scripts/hepdata.py 1234567 --inspire --download "Cross section" -f csv
Download data points to compare with your theoretical predictions:
import pandas as pd
data = pd.read_csv("Table_1.csv")
# Plot data vs your theory
Use together with the inspire skill: