As of 2009, I don't think this functionality was supported. You can look here 
for one solution "I always recommend":

http://www.mail-archive.com/pytables-users@lists.sourceforge.net/msg01207.html

If you store separate vlarrays for each trial, you can keep metadata on those 
vlarrays (guaranteed to stay in sync) or put it in a table (easier to search).

But you may also do well to pick whatever a single time-point would be for your 
column atom, then simply add another column for timestamp. This would allow for 
a "ragged" array that still has a regular, repeated (tabular) structure in 
memory. For example:

Trial data
1 0.4, 0.5, 0.45
2 0.3, 0.4, 0.45, 0.56

becomes

Trial timepoint data
1 1 0.4
1 2 0.5
...
2 4 0.56

If nested VLArrays are supported in PyTables now, I'd certainly love to know!

Alternatively, I think h5py does support the full HDF5 feature-set, so if 
you're really committed to the nested data layout, you may have more luck 
there. You'll be losing out on a lot of nice features though! And in my 
experience, naive neuroscientists end up with quite poor performance since they 
don't get pytables intelligent choices for data layout, chunking, etc. Please 
report back if you go that route!

I'll post this on stack overflow too...

Best,
Dav

On Jun 22, 2011, at 4:26 PM, Jason Moore wrote:

> Anthony,
> 
> I read of the documentation and tried creating a table with a VLArray nested 
> inside, but can't seem to figure out how to nest anything inside a table 
> other than another table description.
> 
> I found this question that is trying to do exactly what I want to do:
> 
> http://stackoverflow.com/questions/5366099/in-pytables-how-to-create-nested-array-of-variable-length
> 
> It is well written but has no answers.
> 
> Any specific ideas on how to make this example work?
> 
> Jason
> 
> On Wed, Jun 22, 2011 at 2:57 PM, Anthony Scopatz <scop...@gmail.com> wrote:
> Also note that whenever you are dealing with variable length stuctures, 
> chuncksize is very important.
> 
> 
> On Wed, Jun 22, 2011 at 4:55 PM, Anthony Scopatz <scop...@gmail.com> wrote:
> Hi Jason, 
> 
> You can try nesting variable length arrays inside of your table 
> (http://www.pytables.org/docs/manual/ch04.html#VLArrayClassDescr).  You might 
> need to refer to nested tables to get an idea of how to do this 
> (http://www.pytables.org/docs/manual/ch03.html#id332794).  On the HDF5 level, 
> tables are just a convenient wrapper around variable length arrays of 
> structs.  Since you can nest tables, you should be able to nest VLArrays 
> inside of tables.
> 
> Let us know if you run into specific problems.
> 
> Be Well
> Anthony   
> 
> On Wed, Jun 22, 2011 at 4:46 PM, Jason Moore <moorepa...@gmail.com> wrote:
> Hi,
> 
> I've been attempting to use pyTables to store data from a data acquisition 
> system that I'm using for my experimental work. I currently make use of 
> several pytables tables to store the data and really like the querying 
> ability that the table object provides. But I have an issue with storing 
> arrays in a table column. For each experiment that I do, I record data for a 
> different amount of time and potentially a different sampling rate. I'd like 
> the rows of the table to correspond with each experiment and the columns with 
> the various data signals that I collect. But it seems that a pytables table 
> object requires every array in a column to be of the same shape. Right now I 
> choose an arbitrarily large shape in my table definition and I'm awkwardly 
> padding the data signals before I store them in the table. Are there other 
> ways to do this?
> 
> Jason
> 
> -- 
> http://mae.ucdavis.edu/~biosport/jkm/
> Sports Biomechanics Lab, UC Davis
> Davis Bike Collective Minister, Davis, CA
> BikeDavis.info
> Office: +01 530-752-2163
> Lab: +01 530-752-2235
> Home: +01 530-753-0794
> 
> 
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
> 
> 
> 
> 
> -- 
> http://mae.ucdavis.edu/~biosport/jkm/
> Sports Biomechanics Lab, UC Davis
> Davis Bike Collective Minister, Davis, CA
> BikeDavis.info
> Office: +01 530-752-2163
> Lab: +01 530-752-2235
> Home: +01 530-753-0794
> 
> ------------------------------------------------------------------------------
> Simplify data backup and recovery for your virtual environment with vRanger.
> Installation's a snap, and flexible recovery options mean your data is safe,
> secure and there when you need it. Data protection magic?
> Nope - It's vRanger. Get your free trial download today.
> http://p.sf.net/sfu/quest-sfdev2dev_______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today.
http://p.sf.net/sfu/quest-sfdev2dev
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to