Thanks for your answer! Maybe a clearer way to ask my question is: How do I get Pytables to read in the data as a Table instead of an Array from the beginning?
The data was generated with another application so given that the h5 files already exist, it would be great to access that data using the nice fast features of pytables Tables instances. The alternative is to recast all my h5 files into new h5 files that pytables then reads in as a Table. This is not my preferred plan of attack as each time I recast a file it takes on the order of 10 minutes and I have 100s of files. Thanks, Raphael On 01/31/2011 12:41 PM, Francesc Alted wrote: > A Saturday 29 January 2011 20:20:15 Raphael Weingartner escrigué: > [clip] >> Question: >> Why is openFile reading the original data file as an array.Array >> object if querying tables is so much faster? > The quick answer is that PyTables is specially tuned for, well, tables. > And these entities wear special I/O buffers and query engines that are > fined tuned for maximum speed. *Array objects do not wear the same > machinery. > > By the way, you can get still faster queries by using the `where()` > method: > > result = [x for x in h5fast.root.detector.where('pnum==7848107')] > > For faster access, you can also use the indexation feature in PyTables > Pro. See: > > http://www.pytables.org/docs/manual/ch05.html#searchOptim > > for some benchmarks and advices on getting maximum query speed. > > Hope this helps, > -- Raphael Weingartner PhD Student Max Planck Institut for Quantum Optics Hans-Kopfermann Str. 1 85748 Garching Germany Phone: +49 (0)89 32905 553 Fax: +49 (0)89 32905 200 Web: www.attoworld.de ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users