LEGEND Data Objects#

legend-pydataobj is a Python implementation of the LEGEND Data Format Specification.

Getting started#

legend-pydataobj is published on the Python Package Index. Install on local systems with pip:

$ pip install legend-pydataobj
$ pip install legend-pydataobj@git+https://github.com/legend-exp/legend-pydataobj@main

Get a LEGEND container with legend-pydataobj pre-installed on Docker hub or follow instructions on the LEGEND wiki.

Inspecting LH5 files from the command line#

The lh5ls shell command uses lh5_store.show() to print a pretty representation of a LH5 file’s contents

$ lh5ls -a legend-testdata/data/lh5/LDQTA_r117_20200110T105115Z_cal_geds_raw.lh5
/
└── geds · HDF5 group
    └── raw · table{packet_id,ievt,timestamp,numtraces,tracelist,baseline,energy,channel,wf_max,wf_std,waveform}
        ├── baseline · array<1>{real}
        ├── channel · array<1>{real}
        ├── energy · array<1>{real}
        ├── ievt · array<1>{real}
        ├── numtraces · array<1>{real}
        ├── packet_id · array<1>{real}
        ├── timestamp · array<1>{real} ── {'units': 's'}
        ├── tracelist · array<1>{array<1>{real}}
        │   ├── cumulative_length · array<1>{real}
        │   └── flattened_data · array<1>{real}
        ├── waveform · table{t0,dt,values}
        │   ├── dt · array<1>{real} ── {'units': 'ns'}
        │   ├── t0 · array<1>{real} ── {'units': 'ns'}
        │   └── values · array_of_equalsized_arrays<1,1>{real}
        ├── wf_max · array<1>{real}
        └── wf_std · array<1>{real}

For more information, have a look at the command’s help section:

$ lh5ls --help

Next steps#