Allow tables in arbitrarily deep hdf5 groups #1068
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a change to
HDF5TableWriter
to allow tables to be output to arbitrarily deep groups in an HDF5 file.The main change (other than some reformatting) is:
group_name
attribute of the HDF5TableWriter is now considered the "base" group (from which all sub-tables will be under)writer.write(table_name="x", containers=y)
works as before, but now you can add deeper nesting likewriter.write(table_name="subgroup/anothergroup/x", containers=y)
and subgroup and anothergroup will be created automatically if they don't exist.test_write_to_any_location
has been re-enabled (it was marked as xfail before)A full example:
Would create 2 tables:
/dl1/tel/image/NectarCam
and/dl1/tel/params
This allow a nicer structure, as shown in #1059 (v5 and above)