-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add write_table and use it in SubarrayDescription.to_hdf, fixes #1449 #1817
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1817 +/- ##
==========================================
+ Coverage 92.22% 92.31% +0.09%
==========================================
Files 190 191 +1
Lines 15196 15388 +192
==========================================
+ Hits 14015 14206 +191
- Misses 1181 1182 +1
Continue to review full report at Codecov.
|
There are some codacy warning mostly regarding the unit tests. Are you fine with that? |
Rebased vs. master, let's see |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine, just need to clean up some unused imports since now those are mandatory. (related - should we remove Codacy from the list of checks since pyflakes is now run? It's nice for history, but always gives lots of errors)
Pyflakes only checks syntax errors and unused imports, not style. Codacy also checks style. |
could add a call to pycodestyle, but yes maybe it's fine now (it's just that we always get a red light from Codacy) |
* This adds a pytables based function to write an astropy table into a hdf5 file using the ctapipe conventions. This enables writing tables in the same format as used by the HDF5TableWriter and those tables can be read using read_table. * It also switches SubarrayDescription.to_hdf / from_hdf to use the new functions, eliminating the mix of astropy table io using h5py and ctapipe hdf5 table io using pytables. * ctapipe files should now only contain datasets written by tables and use the same way to store metadata consistently.
@kosack @LukasNickel can you re-approve? |
This adds a pytables based function to write an astropy table
into a hdf5 file using the ctapipe conventions.
This enables writing tables in the same format as used by the
HDF5TableWriter and those tables can be read using read_table.
It also switches SubarrayDescription.to_hdf / from_hdf to use the new
functions, eliminating the mix of astropy table io using h5py and
ctapipe hdf5 table io using pytables.
ctapipe files should now only contain datasets written by tables and
use the same way to store metadata consistently.
By checking for the existence of
__table_column_meta__
datasets, we can stay backwards compatible and still read older subarray files.This now also adds support for reading and writing unicode strings with a max length in utf8 bytes to the hdf io classes and functions.