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

copy dataset units in geocode.py #910

Merged
merged 1 commit into from
Nov 16, 2022
Merged

copy dataset units in geocode.py #910

merged 1 commit into from
Nov 16, 2022

Conversation

yunjunz
Copy link
Member

@yunjunz yunjunz commented Nov 16, 2022

Description of proposed changes

  • utils.readfile: add get_hdf5_dataset_attrs() to extract a given attribute from all top-level datasets of the input HDF5 file.

  • geocode.py: copy over the dataset unit from input file to output file, e.g. for the velocity.h5 file, as requested by @EJFielding in Copy dataset units in geocode.py #683.

    • call readfile.get_hdf5_dataset_attrs()
    • pass to writefile.layout_hdf5(ds_unit_dict)

Reminders

+ utils.readfile: add `get_hdf5_dataset_attrs()` to extract a given attribute from all top-level datasets of the input HDF5 file.

+ geocode.py: copy over the dataset unit from input file to output file, e.g. for the velocity.h5 file.
   - call readfile.get_hdf5_dataset_attrs()
   - pass to writefile.layout_hdf5(ds_unit_dict)
@yunjunz yunjunz changed the title copy dataset units in geocode.py copy dataset units in geocode.py Nov 16, 2022
@yunjunz yunjunz merged commit e00074a into insarlab:main Nov 16, 2022
@yunjunz yunjunz deleted the geocode branch November 16, 2022 07:32
@EJFielding
Copy link

Thanks for adding the copy of the dataset units to geocode.py.

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.

Copy dataset units in geocode.py
2 participants