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

Minor enhancement to read hdf5 #27

Merged
merged 8 commits into from
Aug 17, 2023
Merged

Minor enhancement to read hdf5 #27

merged 8 commits into from
Aug 17, 2023

Conversation

sanghyukmoon
Copy link
Collaborator

  • header_only optional parameter allows reading only the domain information (including snapshot time), without loading actual data.
  • Added example usage in load_hdf5 function to demonstrate we can load e.g., only the selected field through the keywords arguments quantities or only the selected region through x1_min, x1_max, etc. that are passed to athdf function.
  • Made util.transform.to_spherical more flexible by allowing arbitrary "z-axis" of the spherical coordinates.

Examples
--------
>>> # Load everything at snapshot number 30.
>>> ds = read_hdf5(30)
Copy link
Owner

Choose a reason for hiding this comment

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

Shouldn't the first argument be the filename? Something like this:

from pyathena.io import read_hd5
ds = read_hdf5(s.files['hdf5']['prim'], 30)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct. Thanks for catching this.

Copy link
Owner

@jeonggyukim jeonggyukim left a comment

Choose a reason for hiding this comment

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

Thanks for the additions!

@jeonggyukim jeonggyukim merged commit 8e55348 into master Aug 17, 2023
1 check passed
@sanghyukmoon sanghyukmoon deleted the read_hdf5 branch September 16, 2024 15:02
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.

2 participants