From: <phi...@ho...> - 2005-09-06 14:08:49
|
Francesc Altet wrote: >El dv 02 de 09 del 2005 a les 17:28 +0200, en/na >phi...@ho... va escriure: > > >>Hi Francesc and all others pytables users/developpers, >> >>I have structured data: atmospheric pressure which depends from >>latitute, longitude and time. >>The problem is i can't use pytables Table due to the application >>capabilities involved to manage the file. >> >> > >Uh, you mean limitations specific of pytables or other kind of >limitations? > > > Sorry that doesn't seem clear. No limitations of pytables. It's much more that i'm not allowed to use table. Arrays are more appreciated to achieve my goal . >>The unique solution i have is to store each data in an array (pressure >>is a multidimensionnal array, time is an array, longitude is an array >>and latitude is an array). >> >>Then i have to use a specific attributes to retrieve the right >>assiocation between parameters and pressure. >> >>1. Is there a possibility to put a multidimensionnal attributes, which >>can consist in the list containing the path of the parameters >>([/longitude,/latitute,/time]) ? >>So i know the first dimension of the pressure array is the longitude, >>the second the latitude, the third the time and the last one the values >>of the pressure. >> >> > >I don't know exactly what you are trying to do, but, in general, you can >save any kind of python object as an attribute. However, if this object >has not a direct mapping with a multimensional (or scalar) atomic (i.e. >byte, char, int or float) HDF5 type, then it's pickled. > > That could be a good starting point. I only need an ordered list containing path of each array of system parameters. For example, the attribute could be ['/parameters/longitude','/parameters/latitude','/parameters/time'] > > >>2. Would it be out of context to think about a standard way to link >>inside pytables, the dimension of a multidimensionnal array to the array >>defining the parameters values comparably to Netcdf ? >> >> > >Can you be a bit more explicit on what you want exactly? > > In fact, i'm joining Norbert Nemec in his post from 2005-01-24 11:51 to request a convention in pytables to store not only data but also a way to link the data. Here is thye situation, better represented: Longitude [0.1 0.2 0.3 0.4] Latitude [0.25 0.35 0.45 0.55] latitude ^ Pressure : [[1, 1.25 , 1.78 , 1.4], | (0.25) [3.1 , 2.4 , 1.89 , 8.2], | (0.35) [4.5 , 7.9 , 4.63 , 1], | (0.45) [1.2 , 3.7 , 4.26 , 6]] | (0.55) | longitude < --------------------------------- (0.1) (0.2) (0.3) (0.4) If i am able to know that pressure atmospheric data are store depending first from the latitude then the longitude, i can easily get the pressure given a longitude and a latitude. For example : i need the pressure for longitude 0.2 and latitude 0.45. Then pressure is 7.9. I need to build this thing with pytables. Longitude is an array of shape (4L,), latitude is an array of shape (4L,) and pressure is an array of shape (4L,4L). For the moment, with pytables, there is no system attribute(s) to know first dimension in pressure shape is latitude and second is longitude. Can you give me a something (a specific attribute for example) available in the pytables API, to declare the order of use of each parameters in the pressure array. Thanks a lot, Regards, Philippe Collet >Cheers, > > > |