pub fn py_open(
path: Bound<'_, PyAny>,
rest_frame_indices: Option<Vec<usize>>,
) -> PyResult<PyDataset>
Expand description
Open a Dataset from a file
§Arguments
path : str or Path The path to the file rest_frame_indices : list of int, optional If supplied, the dataset will be boosted to the rest frame of the 4-momenta at the given indices
§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)
aux_{particle index}_{x|y|z}
(auxiliary 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 aux_0_x
, aux_0_y
, and aux_0_z
. This
could continue for an arbitrary number of particles. The weight
column is always
required.