showerpipe.lhe.split(source: Path | str | bytes, stride: int) Iterator[bytes][source]

Generator, splitting LHE file content into separate bytestrings representing LHE files, with maximum number of events per bytestring equal to stride.

Parameters:
source : Pathlike, string, or bytes

The variable or filepath containing the LHE data. May be a path, string, or bytes object. The path may be compressed with gzip.

Returns:

lhe_split – Bytestring, which may be written out as a LHE file, or input to a LheData object.

Return type:

bytes

Notes

Particularly useful for large LHE files, which cannot fit in memory.


Last update: Jun 27, 2025