Open maxnoe opened 3 years ago
Much slower than actually computing these parameters in the event loop and letting the HDFWriter
write them directly.
I understood that the these values are computed outside the event loop for efficiency.
But then, when storing them, the code loops over each single event 7 times again constructing python objects from the numpy arrays!
Can a single table be made with the 7 columns and then add it as a whole to the existing table?
https://github.com/cta-observatory/cta-lstchain/blob/2d2d93e4d9c49f6f5d6f48e9de8d0316191cea89/lstchain/reco/r0_to_dl1.py#L601
By adding columns to the existing table, the whole dl1 parameters data is copied by this function. Probably also resulting in larger hdf5 files, if hdf5 does not reclaim the space.
It even does it in a python for-loop over all rows in the table:
https://github.com/cta-observatory/cta-lstchain/blob/c741c9d89ffe20f3a47d5c3f7addf582f26b95b2/lstchain/io/io.py#L808
This has to be very slow.