pub fn py_open(path: &str) -> PyResult<PyDataset>
Expand description
Open a Dataset from a file
§Returns
Dataset
§Raises
IOError If the file could not be read
§Warnings
This method will panic/fail if the columns do not have the correct names or data types. There is currently no way to make this nicer without a large performance dip (if you find a way, please open a PR).
§Notes
Data should be stored in Parquet format with each column being filled with 32-bit floats
Valid/required column names have the following formats:
p4_{particle index}_{E|Px|Py|Pz}
(four-momentum components for each particle)
eps_{particle index}_{x|y|z}
(polarization/helicity vectors for each particle)
weight
(the weight of the Event)
For example, the four-momentum of the 0th particle in the event would be stored in columns
with the names p4_0_E
, p4_0_Px
, p4_0_Py
, and p4_0_Pz
. That particle’s
polarization could be stored in the columns eps_0_x
, eps_0_y
, and eps_0_z
. This
could continue for an arbitrary number of particles. The weight
column is always
required.