-
Notifications
You must be signed in to change notification settings - Fork 28
Add helper function and class methods to create filter instance from hdf5 "cd_values" #366
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
Open
t20100
wants to merge
13
commits into
silx-kit:main
Choose a base branch
from
t20100:from_options
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+722
−28
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
6303cc7
add from_filter_options classmethods to filters
t20100 b5ceb25
add from_filter_options function
t20100 73c2e77
Add from_filter_options tests
t20100 f503336
Add Sperr.from_filter_options
t20100 fbc29ee
Add SZ3.from_filter_options
t20100 3b1de33
Add SZ.from_filter_options
t20100 d0ed9de
Move SZ/SZ3 pack/unpack as helper functions
t20100 bf0e299
Make from_fitler_options methods private
t20100 ab7ce2f
Add Zfp._from_filter_options
t20100 7a3452d
Add support for filter name as filter_id argument for
t20100 df061ed
update docstrings
t20100 c61e7f0
add from_filter_options to documentation
t20100 f009cd4
fix doc build warning
t20100 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -130,6 +130,34 @@ Zstd | |||||
| :members: | ||||||
| :undoc-members: | ||||||
|
|
||||||
|
|
||||||
| Get dataset compression | ||||||
| +++++++++++++++++++++++ | ||||||
|
|
||||||
| For compression filters provided by HDF5 and `h5py`_ (i.e., GZIP, LZF, SZIP), | ||||||
| dataset compression configuration can be retrieved with `h5py.Dataset`_'s | ||||||
| `compression <https://docs.h5py.org/en/stable/high/dataset.html#h5py.Dataset.compression>`_ and | ||||||
| `compression_opts <https://docs.h5py.org/en/stable/high/dataset.html#h5py.Dataset.compression_opts>`_ properties. | ||||||
|
|
||||||
| For third-party compression filters such as the one supported by `hdf5plugin`, | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| the dataset compression configuration is stored in HDF5 | ||||||
| `filter pipeline <https://docs.h5py.org/en/stable/high/dataset.html#filter-pipeline>`_. | ||||||
| This filter pipeline configuration can be retrieved with `h5py.Dataset`_ "low level" API. | ||||||
| For a given `h5py.Dataset`_, ``dataset``: | ||||||
|
|
||||||
| .. code-block:: python | ||||||
|
|
||||||
| create_plist = dataset.id.get_create_plist() | ||||||
|
|
||||||
| for index in range(create_plist.get_nfilters()): | ||||||
| filter_id, _, filter_options, _ = create_plist.get_filter(index) | ||||||
| print(filter_id, filter_options) | ||||||
|
|
||||||
| For compression filters supported by `hdf5plugin`, | ||||||
| :func:`hdf5plugin.from_filter_options` instantiates the filter configuration from the filter id and options. | ||||||
|
|
||||||
| .. autofunction:: from_filter_options | ||||||
|
|
||||||
| Get information about hdf5plugin | ||||||
| ++++++++++++++++++++++++++++++++ | ||||||
|
|
||||||
|
|
@@ -176,3 +204,4 @@ Setting the ``HDF5_PLUGIN_PATH`` environment variable allows already existing pr | |||||
| .. _h5py: https://www.h5py.org | ||||||
| .. _h5py.h5z: https://github.com/h5py/h5py/blob/master/h5py/h5z.pyx | ||||||
| .. _h5py.Group.create_dataset: https://docs.h5py.org/en/stable/high/group.html#h5py.Group.create_dataset | ||||||
| .. _h5py.Dataset: https://docs.h5py.org/en/stable/high/dataset.html | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe: