Add modelSplitLevel as an option
Issue #349
resolved
To use the new module DataUproot without explicitly importing ROOT, we can add an option modelSplitLevel
(same structure as for samplerSplitLevel). The default value is 1 to be compatible with pybdsim
(pybdsim.data.Getmodel()
).
With this option, we can access the model using the following:
from pybdsim.DataUproot import BDSimOutput
data = BDSimOutput('root_file.root')
data.model.df
Comments (5)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
Thumbs up from me.
What bit of the data is it that uproot has trouble with? Is it an std::vector in a branch? Or a vector of custom class (not a basic type)?
-
reporter I think it has to do with the stored data being in the form of a custom class vector. Therefore, we need to change the split level, to have a vector of known types (float, int, ...).
-
- changed status to resolved
Merged in uproot_feature (pull request #6)
Resolves
#349Approved-by: Laurie Nevay
→ <<cset a540078da837>>
- Log in to comment
Here is a proposal from Laurie:
We can add the option, and we should also add maybe a 'superior' option called uprootCompatible (for example), and when we turn that option on, we then turn on the others required for the split level.
Also, we can warn the user that using a splitlevel = 1 for the samplers can increase the simulation time, especially if the user has a very large number of samplers (e.g. for optics).