|
From: Tom H. <T.D...@ba...> - 2004-04-20 23:06:37
|
Dear Francesc and Pytables users,
Just a quick message to say there is a patch uploaded to provide
support for complex datatypes in arrays (see patch 928606 for more
details).
In a pytables file the complex type (single or double precision) is
represented as a hdf5 compound class with 2 float members: "r" and
"i", that contain the real an impaginary parts respectively. This is
analogous to the numarray representation:
e.g. struct {double r; double i;} for double precision.
I've sucessfully been using pytables with this patch for a couple of
weeks with complex arrays of the Array type, however, it also works
with VLArrays and EArrays.
For me, it's a very convenient way of storing arrays that work across
machines with different endianness. In particular, I'm storing arrays
of of electromagnetic field data generated by a mode solver for
hollow-core photonic crystal fibres that i'm working on for my Ph.D.
e.g. see http://www.opticsexpress.org/abstract.cfm?URI=OPEX-11-22-2854
I've tried to make this a useful contribution by documenting the
changes in the userguide and extending the tests - let me know if
anything is missing.
Also, the patch is still valid against yesterdays cvs version.
Hope you find it useful,
Tom.
|