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

h5py notes #14

Open
azazellochg opened this issue Sep 7, 2020 · 0 comments
Open

h5py notes #14

azazellochg opened this issue Sep 7, 2020 · 0 comments

Comments

@azazellochg
Copy link
Collaborator

  • By default, objects inside group are iterated in alphanumeric order. However, if group is created with track_order=True, the insertion order for the group is remembered (tracked) in HDF5 file, and group contents are iterated in that order. The latter is consistent with Python 3.7+ dictionaries.
  • consider https://docs.h5py.org/en/stable/high/group.html#Group.visit and https://docs.h5py.org/en/stable/high/group.html#Group.visititems
  • consider using datasets to store as numpy strings with/without compression (gzip)
  • eman2 stores md as:
    int numbers - int32
    float - most as f32 (very few as f64)
    strings as fixed length ascii :
            ATTRIBUTE "EMAN.SPIDER.date" {
               DATATYPE  H5T_STRING {
                  STRSIZE 1;
                  STRPAD H5T_STR_NULLTERM;
                  CSET H5T_CSET_ASCII;
                  CTYPE H5T_C_S1;
               }
               DATASPACE  SCALAR
               DATA {
               (0): ""
               }

Now we store strings as utf8 var length. More on strings here: https://docs.h5py.org/en/stable/strings.html

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

No branches or pull requests

1 participant