-
Notifications
You must be signed in to change notification settings - Fork 25
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
Adding dictionaries to point to filter classes - not IDs #207
Comments
Just to clarify. Do you intend to write compressed files from within NexPy? I am asking it because those compression options are defaults, but the datasets in a file can be compressed with different values and one has to get the information from the dataset and not from the hdf5plugin defaults. |
@vasole, the idea was to allow people to set compression filters and their associated parameters when initializing a dataset. After posting, I realized that the example I gave is not really how I would implement this. Instead, I would use the inspect module to find out what keyword arguments are defined for each filter and their defaults, and then add them to the initialization form. This would still need the dictionary pointing to the classes themselves. I know very little about optimizing compression options, so I am willing to be persuaded that it would be better to let power-users do this on the command-line. This is not my top priority, but it would be helpful if the |
I see the convenience. A function retrieving the class from the case-insensitive filter name would also do the job but that is just a detail. One can have both. @t20100 What's your opinion on this? |
It make sense to me too. It should not be called For information, you can get the list of A function (e.g, available_filter_classes = hdf5plugin.get_filter_classes()
blosc, bitshuffle = hdf5plugin.get_filter_classes('blosc', 32008)
blosc = hdf5plugin.get_filter_classes('blosc')[0] |
To associate filter names and classes is going to be implemented (most likely via a function). That will not be enough, when reading datasets, to go from (0, 0, 0, 0, 5, 1, 1) back to the arguments needed to pass to the blosc filter class. The last functionality would require a lot more work. |
I am interested in adding GUI support for
hdf5plugin
filters to NeXpy, but it would be useful if there were a way to access both the installed filters and their default options. At the moment, I can find which filters are installed.However, I can only find the compression options if I instantiate their respective classes.
It would be helpful (to me) if there were an additional dictionary defined in
hdf5plugin.__init__
that linked the filters to the classes, e.g.,This would allow, e.g.,
I wanted to get feedback before issuing a PR in case alternative solutions are already being considered or there are any objections.
The text was updated successfully, but these errors were encountered: