-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
pyathena/load_sim.py
Outdated
Examples | ||
-------- | ||
>>> # Load everything at snapshot number 30. | ||
>>> ds = read_hdf5(30) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
header_only
optional parameter allows reading only the domain information (including snapshot time), without loading actual data.load_hdf5
function to demonstrate we can load e.g., only the selected field through the keywords argumentsquantities
or only the selected region throughx1_min
,x1_max
, etc. that are passed toathdf
function.util.transform.to_spherical
more flexible by allowing arbitrary "z-axis" of the spherical coordinates.