simonsobs / sotodlib

Simons Observatory: Time-Ordered Data processing library.
MIT License
16 stars 19 forks source link

Improve HDF5 writing of toast observations with arbitrary metadata #1010

Open tskisner opened 1 month ago

tskisner commented 1 month ago

The upstream toast HDF5 saving functions only attempt to write "simple" metadata (scalars, arrays, etc) or objects that define a save_hdf5() method. This means that generic, top-level AxisManager meta data which is not one of the standard types will not get written out.

We could add a trivial, toast-compatible save_hdf5() method to AxisManager that calls the existing save() method to write the object contents to an HDF5 group. If this is too intrusive in cases where toast is not being used, we could just append that extra class method in sotodlib.toast.__init__ so that it is only defined in cases where toast is imported.