Skip to main content

Simple utility to convert LesHouchesEvents files to a sqlite database

Project description


Simple utility to convert LesHouchesEvents files to a sqlite database


To run, simply install the package

pip install lhe2sqlite [--user]

Then run with:

convertlhe2sqlite input.lhe output.sqlite3

Then you can examine the content with either stright SQL or your analysis tool of choice (eg pandas).


The resulting database has just 2 tables, event, and particle with a one-to-many relationship between them.

    event_number INTEGER PRIMARY KEY,
    procId INTEGER,
    weight FLOAT,
    scale FLOAT,
    aqed FLOAT,
    aqcd FLOAT
CREATE TABLE particle (
    event_number INTEGER REFERENCES event(event_number),
    pdgId INTEGER,
    status INTEGER,
    mother1 INTEGER,
    mother2 INTEGER,
    color1 INTEGER,
    color2 INTEGER,
    px FLOAT,
    py FLOAT,
    pz FLOAT,
    e FLOAT,
    m FLOAT,
    lifetime FLOAT,
    spin FLOAT

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

lhe2sqlite-0.1.1.tar.gz (2.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page