Skip to content

Conversation

@tskisner
Copy link
Member

@tskisner tskisner commented Dec 4, 2025

  • Remove compile-time dependency on libFLAC and use flacarray instead

  • Convert the existing version-1 HDF5 data format to use flacarray for low-level compression / decompression, while remaining backwards compatible with the existing on-disk group and dataset structure.

  • Define a new version (2) of the native HDF5 data format which makes use of flacarray and enforces consistent use of per-field compression parameters. This new version adds support for saving / loading arbitrary observation attributes, provided they define the save_hdf5() and load_hdf5() methods.

  • Fix Observation duplicate() and eq() methods to correctly handle arbitrary attributes which are more complicated class instances.

- Remove compile-time dependency on libFLAC and use flacarray instead

- Convert the existing version-1 HDF5 data format to use flacarray for
  low-level compression / decompression, while remaining backwards
  compatible with the existing on-disk group and dataset structure.

- Define a new version (2) of the native HDF5 data format which makes
  use of flacarray and enforces consistent use of per-field compression
  parameters.  This new version adds support for saving / loading
  arbitrary observation attributes, provided they define the save_hdf5()
  and load_hdf5() methods.

- Fix Observation duplicate() and __eq__() methods to correctly handle
  arbitrary attributes which are more complicated class instances.
@tskisner tskisner requested a review from keskitalo December 4, 2025 19:11
Copy link
Member

@keskitalo keskitalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massive body of work and with great added value. On what timescale do you intend to remove support for the older file format?

if quanta is None and precision is None:
msg = "When compressing floating point data, you"
msg += " must specify the quanta or precision."
raise RuntimeError("You must specify the quanta")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably intended to be raise RuntimeError(msg)

)


def save_instrument(parent_group, telescope, comm=None, session=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this essentially implementing the save_hdf5() method for the instrument class? Where do we draw the line between classes that implement save_hdf5() and classes that have it implemented externally like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants