Skip to content
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

Fix sparsing from eiger stream files #709

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Aug 18, 2024

  1. Use h5py_read_string() for reading string types

    Unfortunately, since h5py 3 came out, it no longer automatically
    converts string types to strings, and we have to do it manually. We
    need to use the `h5py_read_string()` compatibility function to do
    so.
    
    Signed-off-by: Patrick Avery <[email protected]>
    psavery committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    cb5b114 View commit details
    Browse the repository at this point in the history
  2. Treat arrays with empty shapes as numbers

    Calling `tolist()` on these types of arrays yields a single number
    rather than a list. This would cause errors with the yaml dumper since
    it was expected a list.
    
    Instead, we should just follow the route for single numbers and call
    `.item()` instead. This fixes the issue.
    
    Signed-off-by: Patrick Avery <[email protected]>
    psavery committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    47d5616 View commit details
    Browse the repository at this point in the history
  3. Save eiger metadata as a yaml string

    Because the numpy frame-cache format does not yet support nested
    metadata structures, we cannot save nested metadata as a frame-cache
    without causing errors.
    
    We have some potential solutions to support nested metadata on the
    horizon. Until that time, let's store the eiger stream metadata as
    a yaml string, so that sparse arrays can actually be created from it.
    The metadata is still present, it is just in the form of a yaml string.
    
    Signed-off-by: Patrick Avery <[email protected]>
    psavery committed Aug 18, 2024
    Configuration menu
    Copy the full SHA
    d9ba404 View commit details
    Browse the repository at this point in the history