Skip to content

Functionality to extract usr data, especially energy_lost_in_can

Lukas Hennig requested to merge add-energy-lost-in-can-to-offline-h5 into master

Hi,

the changes are a proposed fix for ml/OrcaSong#36. I changed the function _branch_to_numpy such that it searches through the usr subbranch if it did not find the field in the supplied branch itself. The function _search_field_in_usr_data is used for this search, and it returns an awkward array in a format that can be further used by the rest of _branch_to_numpy.

The functions mentioned above are implemented in an abstract way, i.e., they can be used in the future if further fields from the usr data are required. For now, only the quantity energy_lost_in_can is extractable from the usr data. It is not extracted by default, but the extraction can be activated by supplying the command-line option --with-energy-lost-in-can to h5extractf.

Merge request reports