>From Chapter 2 of the book "Python and HDF5" by Andrew Collette:

"HDF5 and h5py

We’ll use the “h5py” package to talk to HDF5. This package contains
high-level wrappers for the HDF5 objects of files, groups, datasets, and
attributes, as well as extensive low-level wrappers for the HDF5 C data
structures and functions. The examples in this book assume h5py version
2.2.0 or later, which you can get at http://www.h5py.org.

You should note that h5py is not the only commonly used package for talking
to HDF5. PyTables is a scientific database package based on HDF5 that adds
dataset indexing and an additional type system. Since we’ll be talking
about native HDF5 constructs, we’ll stick to h5py, but I strongly recommend
you also check out PyTables if those features interest you."

This makes me think that h5py is probably the better package to use in
Veusz, since it sounds like PyTables implements a lot of stuff on top of
"plain vanilla" HDF5.

Steve



On Thu, Dec 5, 2013 at 11:02 AM, Jeremy Sanders <jer...@jeremysanders.net>wrote:

> Dear all
>
> I'm currently reworking the import code (started yesterday, actually). I'm
> trying to reorganise it so that all the code is defined in one place (i.e.
> the Operation class, the LinkedFile class, the command line command
> [necessary for saved files] and the code for the import dialog). This
> should make it much easier to write or experiment with a non-plugin import.
> Plugin imports are generally ok, except you don't have much user interface
> flexibility. Maybe the new code should work in a week or two (see my
> import_improvement branch, which doesn't work yet).
>
> If I were to write some code, I'd like to know exactly what you'd like to
> get out of the HDF file (as Steve says). It would be very helpful to have
> some example files, and some idea what you'd like to get out of the file.
> I've never used the format, so it's hard to know what common operations
> should be and how to streamline the UI.
>
> Also, if anyone has experience reading HDF5 in Python, which is the better
> python module to use?
>
> Thanks
>
> Jeremy
>
>
>
> On 05/12/13 16:09, Steve Richardson wrote:
>
>> Hi,
>>
>> I've found that making custom data import plugins for Veusz is pretty
>> easy. My method consists of two parts:
>>
>> 1) Write python code that reads your data format. Get this working as a
>> standalone python script. Doing this first, and separate from any Veusz
>> coding, lets you find and fix bugs easily.
>> 2) Write the Veusz plugin for your data format, following the example at
>> http://barmag.net/veusz-wiki/ImportPlugins as a guide. This code will
>> call the functions/classes you wrote in step 1.
>>
>> I've done this for a few custom data formats that I work with.
>>
>> There are several issues that you will probably encounter with HDF5. It
>> is a very flexible file format, which is good for data storage, but will
>> make it harder for you to write code to read your files. There are
>> several python modules that can help; I'd take a look at
>> http://www.h5py.org and http://www.pytables.org since they both use HDF5.
>>
>> Regardless of what approach you take, there will probably end up being
>> some limitations with what you can do with HDF5. Without getting into
>> the guts of Veusz (to define new data formats), you will probably not be
>> able to do things with HDF5 that would be useful for large datasets.
>> E.g., from the h5py site, one of the features is being able to "slice
>> multi-terabyte datasets stored on disk, as if they were real NumPy
>> arrays." I'd love to be corrected, but I don't think you will be able to
>> do that with a Veusz plugin.
>>
>> As I get some time, I'll probably take a shot at making a simple HDF5
>> plugin, since it would be useful for me, too. If I come up with
>> anything, I'll be sure to share it.
>>
>> Steve
>>
>>
>> On Wed, Dec 4, 2013 at 4:06 PM, J Lister <jonathan.lister....@us.af.mil
>> <mailto:jonathan.lister....@us.af.mil>> wrote:
>>
>>     I'm really needing some HDF5 read in support in this. I know many
>>     aerospace engineers that would enjoy using this package, but cannot
>> due
>>     their data being in HDF5. I would be happy to work on a plug-in or
>>     something, but I need more direction.
>>
>>
>>     _______________________________________________
>>     Veusz-discuss mailing list
>>     Veusz-discuss@gna.org <mailto:Veusz-discuss@gna.org>
>>     https://mail.gna.org/listinfo/veusz-discuss
>>
>>
>>
>>
>>
>> _______________________________________________
>> Veusz-discuss mailing list
>> Veusz-discuss@gna.org
>> https://mail.gna.org/listinfo/veusz-discuss
>>
>>
>
_______________________________________________
Veusz-discuss mailing list
Veusz-discuss@gna.org
https://mail.gna.org/listinfo/veusz-discuss

Répondre à