~ubuntu-branches/ubuntu/natty/pytables/natty-updates

« back to all changes in this revision

Viewing changes to doc/html/usersguide9.html

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2006-06-28 10:45:03 UTC
  • mfrom: (1.2.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 5.
  • Revision ID: james.westby@ubuntu.com-20060628104503-cc251q5o5j3e2k10
  * Fixed call to pyversions in debian/rules which failed on recent versions 
    of pyversions
  * Fixed clean rule in debian/rules which left the stamp files behind
  * Acknowledge NMU
  * Added Alexandre Fayolle to uploaders

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!DOCTYPE html
2
 
  PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
3
 
<html><head>
4
 
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5
 
   <title>PyTables User's Guide</title><meta http-equiv="Content-Type" content="text/html"><link rel="schema.DC" href="http://purl.org/dc/elements/1.1/"><meta name="generator" content="The tbook system at http://tbookdtd.sourceforge.net"><meta name="robots" content="index"><meta name="DC.Title" content="PyTables User's Guide"><meta name="DC.Description" content="PyTables User's Guide Hierarchical datasets in Python Release 0.9.1"><meta name="DC.Creator" content="Francesc Altet"><meta name="Author" content="Francesc Altet"><meta name="DC.Creator" content="Scott Prater"><meta name="Author" content="Scott Prater"><meta name="DC.Creator" content="Ivan Vilata"><meta name="Author" content="Ivan Vilata"><meta name="DC.Creator" content="Tom Hedley"><meta name="Author" content="Tom Hedley"><meta name="DC.Date" content="2004-12-02T12:15:05+01:00"><meta name="Date" content="2004-12-02T12:15:05+01:00"><meta name="DC.Rights" content="(c) 2002, 2003, 2004 Francesc Altet"><meta name="Copyright" content="(c) 2002, 2003, 2004 Francesc Altet"><meta name="DC.Type" content="Text"><meta name="DC.Format" content="text/html"><meta name="DC.Language" scheme="rfc3066" content="en"><meta name="Language" content="en"><meta http-equiv="Content-Style-Type" content="text/css"><style type="text/css">
6
 
    body {
7
 
      font-family: serif; text-align: justify;
8
 
      margin: 0pt; line-height: 1.3; background-color: white; color: black }
9
 
    body.letter { background-image: none }
10
 
    h1, h2, h3, h4, h5, h6, div.partheadline, div.title,
11
 
      div.title-article {
12
 
      font-family: sans-serif; font-weight: bold; font-stretch: condensed;
13
 
      text-align: left; }
14
 
    h1, h2, h3, h4, h5, h6, div.partheadline { padding-left: 18pt }
15
 
    h1 { clear: both }
16
 
    h1.toc { clear: none }
17
 
    a:link, a:visited, a:active { text-decoration: none }
18
 
    a:hover[href] { text-decoration: underline; color: #0066FF; }
19
 
    div.document, div.letter { margin-left: 80px; margin-right: 150px;
20
 
      padding-top: 3ex; padding-bottom: 5ex }
21
 
    div.authorlist { font-family: sans-serif;
22
 
      font-stretch: condensed; text-align: left; font-size: x-large;
23
 
      margin-bottom: 1ex }
24
 
    div.authorlist-article { font-size: x-large; text-align: center;
25
 
      margin-bottom: 2ex }
26
 
    div.title { font-size: xx-large; color: gray; margin-bottom: 5ex; }
27
 
    div.title-article { font-size: xx-large; text-align: center;
28
 
      margin-bottom: 1ex }
29
 
    div.date-article { font-size: large; text-align: center;
30
 
      margin-bottom: 5ex }
31
 
    div.subtitle { text-align: left; margin-bottom: 3ex }
32
 
    div.legal { text-align: right }
33
 
    div.legalnotice { margin-top: 3ex; text-align: left }
34
 
    div.partheadline { font-size: xx-large; margin-top: 1ex; margin-bottom: 1ex }
35
 
    div.footnote { }
36
 
    hr.footnoterule { text-align: left; width: 40%; margin-right: 60%; color: black }
37
 
    div.mathdisplay { text-align: center;
38
 
    margin-top: 2ex; margin-bottom: 2ex }
39
 
    div.figure, div.table, div.mathml-remark { margin-bottom: 3ex;
40
 
            margin-top: 2ex}
41
 
    div.mathml-remark { width: 50%; text-align: left; text-indent: 0pt }
42
 
    div.caption { margin-top: 1ex; width: 20em}
43
 
    div.caption-text { font-size: small;
44
 
      padding-left: 1em; text-indent: -1em; text-align: left}
45
 
    caption { max-width: 100%; min-width: 200px; margin-bottom: 1ex;
46
 
      text-align: left }
47
 
    div.verse { white-space: pre; margin-left: 2em;
48
 
      margin-top: 2ex; margin-bottom: 2ex }
49
 
    div.toc { margin-bottom: 6ex }
50
 
    div.biblio { }
51
 
    div.index { width: 100% }
52
 
    div.aphorism { margin-bottom: 2ex; font-style: italic; text-align: right;
53
 
      margin-left: 50%}
54
 
    div.aphorism-origin { margin-top: 1ex }
55
 
    div.letter { }
56
 
    div.subject { margin-top: 3ex; margin-bottom: 3ex }
57
 
    div.opening { margin-top: 3ex; margin-bottom: 3ex }
58
 
    div.closing { margin-top: 3ex; text-align: right }
59
 
    div.to { margin-top: 3ex; margin-bottom: 3ex }
60
 
    span.subject { font-weight: bold }
61
 
    div.speedbar-top, div.speedbar-bottom { margin-left: 1em; margin-right: 1em }
62
 
    div.speedbar-top { margin-top: 2ex }
63
 
    div.speedbar-bottom { margin-bottom: 3ex }
64
 
    table.speedbar { width: 100% }
65
 
    hr.speedbar { clear: both }
66
 
    div.theorem-plain, div.theorem-definition, div.theorem-remark { margin-top: 2ex;
67
 
      margin-bottom: 2ex }
68
 
    div.theorem-plain { font-style: italic }
69
 
    div.proof { margin-top: 2ex; margin-bottom: 2ex }
70
 
    span.theorem-head-plain, span.theorem-head-definition, span.theorem-head-remark
71
 
      { margin-right: 0.66em }
72
 
    span.theorem-head-plain, span.theorem-head-definition
73
 
      { font-style: normal; font-weight: bold }
74
 
    span.theorem-head-remark { font-style: italic }
75
 
    span.proof-head { font-style: italic; margin-right: 0.66em }
76
 
    acronym { font-size: 95%; letter-spacing: 0.1em; text-transform: uppercase }
77
 
    td.header { text-align: center; font-weight: bold }
78
 
    table.toc { }
79
 
    table.tabular { font-size: smaller }
80
 
    td.thickline { height: 0pt; border-bottom: medium solid; padding: 2px }
81
 
    td.thinline { height: 0pt; border-bottom: thin solid;   padding: 2px }
82
 
     /* FixMe: Following definition Still bad */
83
 
    div.part-toc { margin-top: 2ex; font-weight: bold; font-size: larger }
84
 
     /* FixMe: Following definition: How cleaner? */
85
 
    div.toplevel-toc { margin-top: 1ex; font-weight: bold }
86
 
    td.number1 { width: 1.5em }
87
 
    td.number2 { width: 2em }
88
 
    td.number3 { width: 3em }
89
 
    td.author { text-align: center; width: 50% }
90
 
    div { }  /* Must remain empty! */
91
 
    span.captionlabel { font-family: sans-serif; font-weight: bold;
92
 
      margin-right: 0.66em }
93
 
    span.captionlabel:after { content: " " }
94
 
    b.captionlabel {  }
95
 
    b.captionlabel:after { content: " " }
96
 
    span.headlinenumber { margin-right: 0.66em }
97
 
    tt.verb {font-family: monospace }
98
 
    span.bibtag { font-weight: bold; margin-right: 1em }
99
 
    span.bib-author { }
100
 
    span.bib-lastname { font-variant: small-caps }
101
 
    span.bib-title { font-style: italic }
102
 
    span.bib-booktitle { }
103
 
    span.bib-journal { }
104
 
    span.bib-journal-volume { font-weight: bold }
105
 
    span.bib-publisher { }
106
 
    span.bib-school { }
107
 
    span.bib-year { }
108
 
    span.bib-note { }
109
 
    span { } /* Muss leer bleiben! */
110
 
    li.bibitem { margin-left: 1em; text-indent: -1em }
111
 
    img.graphics { border: 0pt }
112
 
    p,div.p { margin: 0pt; text-indent: 18pt }
113
 
    ul, dl, ol { text-indent: 0pt; }
114
 
    p.first, div.p-first { margin: 0pt; text-indent: 0pt }
115
 
    p.bibitem { margin-top: 1.5ex; margin-left: 3em; text-indent: -3em }
116
 
    ul.biblio { list-style: none }
117
 
    mi.ch { font-style: normal }
118
 
    math[display="block"], div.equation {
119
 
      margin-top: 1ex; margin-bottom: 1ex }
120
 
    div.i-lettergroup { font-size: larger; font-weight: bold; padding-left: 18pt;
121
 
      margin-top: 3ex; margin-bottom: 1.5ex }
122
 
    div.i-item { }
123
 
    div.i-main { }
124
 
    dt { display: compact; font-weight: bold }
125
 
    dd { text-indent: 0pt }
126
 
    pre { text-indent: 0pt }
127
 
    span.i-see { font-style: italic; }
128
 
 
129
 
h1 { color: red }
130
 
h2 { color: olive }
131
 
h3 { color: navy }
132
 
h4 { color: maroon }
133
 
body { /* background-image: url("tile.jpg"); */  /* Per a imprimir millor */
134
 
 font: 14px/1.5 Verdana, Arial, Helvetica, sans-serif;
135
 
 background:#fff;
136
 
 padding:5%;
137
 
 padding-top:2%;
138
 
 margin:0px;
139
 
}
140
 
/*     body { background-image: url("tile.jpg");
141
 
         background-color: white;
142
 
         color: black;
143
 
         font-size: 13pt; } */
144
 
hr.footnoterule { color: white }
145
 
div.title { font-size: x-large; color: maroon }
146
 
div.subtitle { font-size: x-large; color: olive }
147
 
div.title-article { font-size: x-large }
148
 
div.partheadline { font-size: x-large }
149
 
</style></head><body><div class="speedbar-top"><table class="speedbar"><tbody><tr><td style="text-align: left; width: 15%"><a href="usersguide8.html">previous</a></td><td style="text-align: center"><a href="usersguide.html#tb:table-of-contents">Table of Contents</a></td><td style="text-align: right; width: 15%"><a href="usersguide10.html">next</a></td></tr><tr><td class="header" colspan="3">Appendix</td></tr></tbody></table><hr class="speedbar"></div><div class="document"><div id="PyTablesInternalFormat"><a name="PyTablesInternalFormat"></a>
150
 
        <h1 id="chapterC"><a name="chapterC"></a>Appendix&nbsp;C: <tt>PyTables</tt> File
151
 
          Format</h1>
152
 
 
153
 
        <p class="first"><tt class="verb">PyTables</tt> has a powerful capability to deal
154
 
          with native HDF5 files created with another tools. However,
155
 
          there are situations were you may want to create truly
156
 
          native <tt class="verb">PyTables</tt> files with those tools while
157
 
          retaining fully compatibility with <tt class="verb">PyTables</tt>
158
 
          format. That is perfectly possible, and in this appendix is
159
 
          presented the format that you should endow to your
160
 
          own-generated files in order to get a fully
161
 
          <tt class="verb">PyTables</tt> compatible file.
162
 
        </p>
163
 
 
164
 
        <p>We are going to describe the <b>1.3
165
 
          version of <tt class="verb">PyTables</tt> file format</b>
166
 
          (introduced in <tt class="verb">PyTables</tt> version 0.9). At this
167
 
          stage, this file format is considered stable enough to do
168
 
          not introduce significant changes during a reasonable amount
169
 
          of time. As time goes by, some changes will be introduced
170
 
          (and documented here) in order to cope with new
171
 
          necessities. However, the changes will be carefully analyzed
172
 
          so as to ensure backward compatibility whenever is possible.
173
 
        </p>
174
 
 
175
 
        <p>A <tt class="verb">PyTables</tt> file is composed with arbitrarily
176
 
          large amounts of HDF5 groups (<tt class="verb">Groups</tt> in
177
 
          <tt class="verb">PyTables</tt> naming scheme) and datasets
178
 
          (<tt class="verb">Leaves</tt> in <tt class="verb">PyTables</tt> naming
179
 
          scheme). For groups, the only requirements are that they
180
 
          must have some <em>system attributes</em> available. By
181
 
          convention, system attributes in <tt class="verb">PyTables</tt> are
182
 
          written in upper case, and user attributes in lower case but
183
 
          this is not enforced by the software. In the case of
184
 
          datasets, besides the mandatory system attributes, some
185
 
          conditions are further needed in their storage layout, as
186
 
          well as in the datatypes used in there, as we will see
187
 
          shortly.
188
 
        </p>
189
 
 
190
 
        <p>As a final remark, you can use any filter as you want to
191
 
          create a <tt class="verb">PyTables</tt> file, provided that the
192
 
          filter is a standard one in HDF5, like <em>zlib</em>,
193
 
          <em>shuffle</em> or <em>szip</em> (although the last one
194
 
          cannot be used from within <tt class="verb">PyTables</tt> to create a
195
 
          new file, datasets compressed with szip can be read, because
196
 
          it is the HDF5 library which do the decompression
197
 
          transparently).
198
 
        </p>
199
 
 
200
 
        <div>
201
 
          <h2 id="sectionC.1"><span class="headlinenumber"><a name="sectionC.1"></a>C.1 </span>Mandatory attributes for a <tt>File</tt></h2>
202
 
 
203
 
          <p class="first">The <tt class="verb">File</tt> object is, in fact, an special HDF5
204
 
            <em>group</em> structure that is <em>root</em> for the
205
 
            rest of the objects on the object tree. The next
206
 
            attributes are mandatory for the HDF5 <em>root group</em>
207
 
            structure in <tt class="verb">PyTables</tt> files:
208
 
          </p>
209
 
 
210
 
          <dl>
211
 
            <dt>CLASS</dt> <dd>This attribute should always be
212
 
            set to <tt class="verb">'GROUP'</tt> for group structures.</dd>
213
 
            <dt>PYTABLES_FORMAT_VERSION</dt> <dd>It represents
214
 
            the internal format version, and currently should be set
215
 
            to the <tt class="verb">'1.2'</tt> string.</dd>
216
 
            <dt>TITLE</dt> <dd>A string where the user can put
217
 
            some description on what is this group used for. </dd>
218
 
            <dt>VERSION</dt> <dd>Should contains the string
219
 
            <tt class="verb">'1.0'</tt>.</dd>
220
 
          </dl>
221
 
 
222
 
        </div>
223
 
        <div>
224
 
          <h2 id="sectionC.2"><span class="headlinenumber"><a name="sectionC.2"></a>C.2 </span>Mandatory attributes for a <tt>Group</tt></h2>
225
 
 
226
 
          <p class="first">The next attributes are mandatory for <em>group</em>
227
 
            structures:
228
 
          </p>
229
 
 
230
 
          <dl>
231
 
            <dt>CLASS</dt> <dd>This attribute should always be
232
 
            set to <tt class="verb">'GROUP'</tt> for group structures.</dd>
233
 
            <dt>TITLE</dt> <dd>A string where the user can put
234
 
            some description on what is this group used for. </dd>
235
 
            <dt>VERSION</dt> <dd>Should contains the string
236
 
            <tt class="verb">'1.0'</tt>.</dd>
237
 
          </dl>
238
 
 
239
 
          <p>There exist a special <tt class="verb">Group</tt>, called the
240
 
            <em>root</em>, that, in addition to the attributes listed
241
 
            above, it requires the next one:
242
 
          </p>
243
 
 
244
 
          <dl>
245
 
            <dt>PYTABLES_FORMAT_VERSION</dt> <dd>It represents
246
 
            the internal format version, and currently should be set
247
 
            to the <tt class="verb">'1.3'</tt> string.</dd>
248
 
          </dl>
249
 
 
250
 
        </div>
251
 
 
252
 
        <div>
253
 
          <h2 id="sectionC.3"><span class="headlinenumber"><a name="sectionC.3"></a>C.3 </span>Mandatory attributes, storage layout and supported
254
 
              datatypes for <tt>Leaves</tt>
255
 
              </h2>
256
 
 
257
 
          <p class="first">This depends on the kind of <tt class="verb">Leaf</tt>. The
258
 
            format for each type follows.
259
 
          </p>
260
 
 
261
 
          <div id="TableFormatDescr"><a name="TableFormatDescr"></a>
262
 
            <h3 id="subsectionC.3.1"><span class="headlinenumber"><a name="subsectionC.3.1"></a>C.3.1 </span><tt>Table</tt>
263
 
            format</h3>
264
 
 
265
 
            <div>
266
 
              <h4 id="subsubsectionC.3.1.1">Mandatory attributes</h4>
267
 
 
268
 
              <p class="first">The next attributes are mandatory for <em>table</em>
269
 
                structures:
270
 
              </p>
271
 
 
272
 
              <dl>
273
 
                <dt>CLASS</dt> <dd>Must be set to
274
 
                  <tt class="verb">'TABLE'</tt>.</dd>
275
 
 
276
 
                <dt>TITLE</dt> <dd>A string where the user can
277
 
                  put some description on what is this dataset used
278
 
                  for. </dd>
279
 
 
280
 
                <dt>VERSION</dt> <dd>Should contain the string
281
 
                  <tt class="verb">'2.2'</tt>.</dd>
282
 
 
283
 
                <dt>FIELD_X_NAME</dt> <dd>It contains the names
284
 
                  of the different fields. The <tt class="verb">X</tt> means
285
 
                  the number of the field (beware, order do
286
 
                  matter). You should add as many attributes of this
287
 
                  kind as fields you have in your records.
288
 
                </dd>
289
 
 
290
 
                <dt>NROWS</dt> <dd>This should contain the
291
 
                  number of <em>compound</em> datatype entries in the
292
 
                  dataset. It must be an <em>int</em> datatype.</dd>
293
 
              </dl>
294
 
 
295
 
            </div>
296
 
 
297
 
            <div>
298
 
              <h4 id="subsubsectionC.3.1.2">Storage Layout</h4>
299
 
 
300
 
              <p class="first">A <tt class="verb">Table</tt> has a <em>dataspace</em> with a
301
 
                <em>1-dimensional chunked</em> layout.
302
 
              </p>
303
 
            </div>
304
 
 
305
 
            <div>
306
 
              <h4 id="subsubsectionC.3.1.3">Datatypes supported</h4>
307
 
 
308
 
              <p class="first">The datatype of the elements (rows) of
309
 
                <tt class="verb">Table</tt> must be the H5T_COMPOUND
310
 
                <em>compound</em> datatype, and each of these compound
311
 
                components must be built with only the next HDF5
312
 
                datatypes <em>classes</em>:
313
 
              </p>
314
 
 
315
 
              <dl>
316
 
                <dt>H5T_BITFIELD</dt> <dd>This class is used to
317
 
                  represent the <tt class="verb">Bool</tt> type. Such a type
318
 
                  must be build using a H5T_NATIVE_B8 datatype,
319
 
                  followed by a HDF5 <tt class="verb">H5Tset_precision</tt>
320
 
                  call to set its precision to be just 1 bit.
321
 
                </dd>
322
 
                <dt>H5T_INTEGER</dt> <dd>This includes the next
323
 
                  datatypes:
324
 
                  <dl>
325
 
                    <dt>H5T_NATIVE_SCHAR</dt> <dd>This
326
 
                      represents a <em>signed char</em> C type, but it
327
 
                      is effectively used to represent an
328
 
                      <tt class="verb">Int8</tt> type.
329
 
                    </dd>
330
 
                    <dt>H5T_NATIVE_UCHAR</dt> <dd>This
331
 
                      represents an <em>unsigned char</em> C type, but
332
 
                      it is effectively used to represent an
333
 
                      <tt class="verb">UInt8</tt> type.
334
 
                    </dd>
335
 
                    <dt>H5T_NATIVE_SHORT</dt> <dd>This
336
 
                      represents a <em>short</em> C type, and
337
 
                      it is effectively used to represent an
338
 
                      <tt class="verb">Int16</tt> type.
339
 
                    </dd>
340
 
                    <dt>H5T_NATIVE_USHORT</dt> <dd>This
341
 
                      represents an <em>unsigned short</em> C type, and
342
 
                      it is effectively used to represent an
343
 
                      <tt class="verb">UInt16</tt> type.
344
 
                    </dd>
345
 
                    <dt>H5T_NATIVE_INT</dt> <dd>This represents
346
 
                      an <em>int</em> C type, and it is effectively
347
 
                      used to represent an <tt class="verb">Int32</tt> type.
348
 
                    </dd>
349
 
                    <dt>H5T_NATIVE_UINT</dt> <dd>This
350
 
                      represents an <em>unsigned int</em> C type, and
351
 
                      it is effectively used to represent an
352
 
                      <tt class="verb">UInt32</tt> type.
353
 
                    </dd>
354
 
                    <dt>H5T_NATIVE_LONG</dt> <dd>This represents
355
 
                      a <em>long</em> C type, and it is effectively
356
 
                      used to represent an <tt class="verb">Int32</tt> or an
357
 
                      <tt class="verb">Int64</tt>, depending on whether you are
358
 
                      running a 32-bit or 64-bit architecture.
359
 
                    </dd>
360
 
                    <dt>H5T_NATIVE_ULONG</dt> <dd>This
361
 
                      represents an <em>unsigned long</em> C type, and
362
 
                      it is effectively used to represent an
363
 
                      <tt class="verb">UInt32</tt> or an <tt class="verb">UInt64</tt>,
364
 
                      depending on whether you are running a 32-bit or
365
 
                      64-bit architecture.
366
 
                    </dd>
367
 
                    <dt>H5T_NATIVE_LLONG</dt> <dd>This
368
 
                      represents a <em>long long</em> C type
369
 
                      (<tt class="verb">__int64</tt>, if you are using a
370
 
                      Windows system) and it is effectively
371
 
                      used to represent an <tt class="verb">Int64</tt> type.
372
 
                    </dd>
373
 
                    <dt>H5T_NATIVE_ULLONG</dt> <dd>This
374
 
                      represents an <em>unsigned long long</em> C type
375
 
                      (beware: this type does not have a
376
 
                      correspondence on Windows systems) and it is
377
 
                      effectively used to represent an
378
 
                      <tt class="verb">UInt64</tt> type.
379
 
                    </dd>
380
 
                  </dl>
381
 
                </dd>   
382
 
                <dt>H5T_FLOAT</dt> <dd>This includes the next
383
 
                  datatypes:
384
 
                  <dl>
385
 
                    <dt>H5T_NATIVE_FLOAT</dt> <dd>This
386
 
                      represents a <em>float</em> C type and it is
387
 
                      effectively used to represent an
388
 
                      <tt class="verb">Float32</tt> type.
389
 
                    </dd>
390
 
                    <dt>H5T_NATIVE_DOUBLE</dt> <dd>This
391
 
                      represents a <em>double</em> C type and it is
392
 
                      effectively used to represent an
393
 
                      <tt class="verb">Float64</tt> type.
394
 
                    </dd>
395
 
                  </dl>
396
 
                </dd>
397
 
                <dt>H5T_STRING</dt> <dd>The datatype used to
398
 
                  describe strings in PyTables is H5T_C_S1 (i.e. a
399
 
                  <em>string</em> C type) followed with a call to the
400
 
                  HDF5 <tt class="verb">H5Tset_size()</tt> function to set
401
 
                  their length.
402
 
                </dd>
403
 
                <dt>H5T_ARRAY</dt> <dd>This allows the
404
 
                  construction of homogeneous, multi-dimensional
405
 
                  arrays, so that you can include such objects in
406
 
                  compound records. The types supported as elements of
407
 
                  H5T_ARRAY datatypes are the ones described
408
 
                  above. Currently, <tt class="verb">PyTables</tt> does not
409
 
                  support nested H5T_ARRAY types.
410
 
                </dd>
411
 
                <dt>H5T_COMPOUND</dt> <dd>This allows the
412
 
                  support of complex numbers. Its format is described
413
 
                  below:
414
 
                  <p class="first">
415
 
                    The H5T_COMPOUND type class contains two
416
 
                    members. Both members must have the H5T_FLOAT
417
 
                    atomic datatype class. The name of the first
418
 
                    member should be "r" and represents the real
419
 
                    part. The name of the second member should be "i"
420
 
                    and represents the imaginary part.  The
421
 
                    <em>precision</em> property of both of the
422
 
                    H5T_FLOAT members must be either 32 significant
423
 
                    bits (e.g. H5T_NATIVE_FLOAT) or 64 significant
424
 
                    bits (e.g. H5T_NATIVE_DOUBLE).  They represent
425
 
                    Complex32 and Complex64 types respectively.
426
 
                  </p>
427
 
                </dd>
428
 
              </dl>
429
 
              
430
 
              <p>Currently, <tt class="verb">PyTables</tt> does not support
431
 
                nested H5T_COMPOUND types, the only exception being
432
 
                supporting complex numbers in <tt class="verb">Table</tt>
433
 
                objects as described above.
434
 
              </p>
435
 
 
436
 
            </div>
437
 
 
438
 
          </div>        
439
 
 
440
 
          <div id="ArrayFormatDescr"><a name="ArrayFormatDescr"></a>
441
 
            <h3 id="subsectionC.3.2"><span class="headlinenumber"><a name="subsectionC.3.2"></a>C.3.2 </span><tt>Array</tt>
442
 
              format</h3>
443
 
 
444
 
            <div>
445
 
              <h4 id="subsubsectionC.3.2.1">Mandatory attributes</h4>
446
 
 
447
 
              <p class="first">The next attributes are mandatory for <em>array</em>
448
 
                structures:
449
 
              </p>
450
 
 
451
 
              <dl>
452
 
                <dt>CLASS</dt> <dd>Must be set to
453
 
                  <tt class="verb">'ARRAY'</tt>.
454
 
                </dd>
455
 
 
456
 
                <dt>FLAVOR</dt> <dd>This is meant to provide the
457
 
                  information about the kind of object kept in the
458
 
                  <tt class="verb">Array</tt>, i.e. when the dataset is read,
459
 
                  it will be converted to the indicated flavor. It can
460
 
                  take one the next string values:
461
 
 
462
 
                  <dl>
463
 
                    <dt>"NumArray"</dt> <dd>The dataset will be
464
 
                      returned as a <tt class="verb">NumArray</tt> object (from
465
 
                      the <tt class="verb">numarray</tt> package).
466
 
                    </dd>
467
 
                    <dt>"CharArray"</dt> <dd>The dataset will be
468
 
                      returned as a <tt class="verb">CharArray</tt> object
469
 
                      (from the <tt class="verb">numarray</tt> package).
470
 
                    </dd>
471
 
                    <dt>"Numeric"</dt> <dd>The dataset will be
472
 
                      returned as an <tt class="verb">array</tt> object
473
 
                      (from the <tt class="verb">Numeric</tt> package).
474
 
                    </dd>
475
 
                    <dt>"List"</dt> <dd>The dataset will be
476
 
                      returned as a Python <tt class="verb">List</tt> object.
477
 
                    </dd>
478
 
                    <dt>"Tuple"</dt> <dd>The dataset will be
479
 
                      returned as a Python <tt class="verb">Tuple</tt> object.
480
 
                    </dd>
481
 
                    <dt>"Int"</dt> <dd>The dataset will be
482
 
                      returned as a Python <tt class="verb">Int</tt>
483
 
                      object. This is meant mainly for scalar
484
 
                      (i.e. without dimensions) integer values.
485
 
                    </dd>
486
 
                    <dt>"Float"</dt> <dd>The dataset will be
487
 
                      returned as a Python <tt class="verb">Float</tt>
488
 
                      object. This is meant mainly for scalar
489
 
                      (i.e. without dimensions) floating point values.
490
 
                    </dd>
491
 
                    <dt>"String"</dt> <dd>The dataset will be
492
 
                      returned as a Python <tt class="verb">String</tt>
493
 
                      object. This is meant mainly for scalar
494
 
                      (i.e. without dimensions) string values.
495
 
                    </dd>
496
 
                  </dl>
497
 
                </dd>
498
 
 
499
 
                <dt>TITLE</dt> <dd>A string where the user can
500
 
                  put some description on what is this dataset used
501
 
                  for.
502
 
                </dd>
503
 
 
504
 
                <dt>VERSION</dt> <dd>Should contain the string
505
 
                  <tt class="verb">'2.1'</tt>.
506
 
                </dd>
507
 
              </dl>
508
 
            </div>
509
 
 
510
 
            <div>
511
 
              <h4 id="subsubsectionC.3.2.2">Storage Layout</h4>
512
 
 
513
 
              <p class="first">An <tt class="verb">Array</tt> has a <em>dataspace</em> with a
514
 
                <em>N-dimensional contiguous</em> layout (if you
515
 
                prefer a <em>chunked</em> layout see
516
 
                <tt class="verb">EArray</tt> below).
517
 
              </p>
518
 
            </div>
519
 
 
520
 
            <div>
521
 
              <h4 id="subsubsectionC.3.2.3">Datatypes supported</h4>
522
 
 
523
 
              <p class="first">The elements of <tt class="verb">Array</tt> must have either
524
 
                HDF5 <em>atomic</em> datatypes or a <em>compound</em>
525
 
                datatype representing a complex number.  The atomic
526
 
                datatypes can currently be one of the next HDF5
527
 
                datatype <em>classes</em>: H5T_BITFIELD, H5T_INTEGER,
528
 
                H5T_FLOAT and H5T_STRING. See the <tt class="verb">Table</tt>
529
 
                format description in <a href="#TableFormatDescr">section&nbsp;C.3.1</a> for more info
530
 
                about these types.
531
 
              </p>
532
 
 
533
 
              <p>In addition to the HDF5 atomic datatypes, the Array
534
 
                format supports complex numbers with the H5T_COMPOUND
535
 
                datatype class. See the <tt class="verb">Table</tt> format
536
 
                description in <a href="#TableFormatDescr">section&nbsp;C.3.1</a> for more info
537
 
                about this special type.
538
 
              </p>
539
 
 
540
 
              <p>You should note that H5T_ARRAY class datatypes are
541
 
                not allowed in <tt class="verb">Array</tt> objects.
542
 
              </p>
543
 
 
544
 
            </div>
545
 
          </div>        
546
 
 
547
 
          <div id="EArrayFormatDescr"><a name="EArrayFormatDescr"></a>
548
 
            <h3 id="subsectionC.3.3"><span class="headlinenumber"><a name="subsectionC.3.3"></a>C.3.3 </span><tt>EArray</tt>
549
 
              format</h3>
550
 
 
551
 
            <div>
552
 
              <h4 id="subsubsectionC.3.3.1">Mandatory attributes</h4>
553
 
 
554
 
              <p class="first">The next attributes are mandatory for <em>earray</em>
555
 
                structures:
556
 
              </p>
557
 
 
558
 
              <dl>
559
 
                <dt>CLASS</dt> <dd>Must be set to
560
 
                  <tt class="verb">'EARRAY'</tt>.
561
 
                </dd>
562
 
 
563
 
                <dt>EXTDIM</dt> <dd>(<em>Integer</em>) Must be
564
 
                  set to the extensible dimension. Only one extensible
565
 
                  dimension is supported right now.
566
 
                </dd>
567
 
 
568
 
                <dt>FLAVOR</dt> <dd>This is meant to provide the
569
 
                  information about the kind of objects kept in the
570
 
                  <tt class="verb">EArray</tt>, i.e. when the dataset is read,
571
 
                  it will be converted to the indicated flavor. It can
572
 
                  take the same values as the <tt class="verb">Array</tt>
573
 
                  object (see <a href="#ArrayFormatDescr">C.3.2</a>),
574
 
                  except <tt class="verb">"Int"</tt> and <tt class="verb">"Float"</tt>.
575
 
 
576
 
                </dd>
577
 
                <dt>TITLE</dt> <dd>A string where the user can
578
 
                  put some description on what is this dataset used
579
 
                  for.
580
 
                </dd>
581
 
 
582
 
                <dt>VERSION</dt> <dd>Should contain the string
583
 
                  <tt class="verb">'1.1'</tt>.
584
 
                </dd>
585
 
 
586
 
              </dl>
587
 
            </div>
588
 
 
589
 
            <div>
590
 
              <h4 id="subsubsectionC.3.3.2">Storage Layout</h4>
591
 
 
592
 
              <p class="first">An <tt class="verb">EArray</tt> has a <em>dataspace</em> with
593
 
                a <em>N-dimensional chunked</em> layout.
594
 
              </p>
595
 
            </div>
596
 
 
597
 
            <div>
598
 
              <h4 id="subsubsectionC.3.3.3">Datatypes supported</h4>
599
 
 
600
 
              <p class="first">The elements of <tt class="verb">EArray</tt> are allowed to
601
 
                have the same datatypes as for the elements in the
602
 
                Array format.  They can be one of the HDF5
603
 
                <em>atomic</em> datatype <em>classes</em>:
604
 
                H5T_BITFIELD, H5T_INTEGER, H5T_FLOAT or H5T_STRING,
605
 
                see the <tt class="verb">Table</tt> format description in <a href="#TableFormatDescr">section&nbsp;C.3.1</a> for more info
606
 
                about these types.  They can also be a H5T_COMPOUND
607
 
                datatype representing a complex number, see the
608
 
                <tt class="verb">Table</tt> format description in <a href="#TableFormatDescr">section&nbsp;C.3.1</a>.
609
 
              </p>
610
 
              
611
 
              <p>You should note that H5T_ARRAY class datatypes are
612
 
                not allowed in <tt class="verb">EArray</tt> objects.
613
 
              </p>
614
 
 
615
 
            </div>
616
 
          </div>        
617
 
 
618
 
          <div id="VLArrayFormatDescr"><a name="VLArrayFormatDescr"></a>
619
 
            <h3 id="subsectionC.3.4"><span class="headlinenumber"><a name="subsectionC.3.4"></a>C.3.4 </span><tt>VLArray</tt>
620
 
              format</h3>
621
 
 
622
 
            <div>
623
 
              <h4 id="subsubsectionC.3.4.1">Mandatory attributes</h4>
624
 
 
625
 
              <p class="first">The next attributes are mandatory for
626
 
                <em>vlarray</em> structures:
627
 
              </p>
628
 
 
629
 
              <dl>
630
 
                <dt>CLASS</dt> <dd>Must be set to
631
 
                  <tt class="verb">'VLARRAY'</tt>.
632
 
                </dd>
633
 
 
634
 
                <dt>FLAVOR</dt> <dd>This is meant to provide the
635
 
                  information about the kind of objects kept in the
636
 
                  <tt class="verb">VLArray</tt>, i.e. when the dataset is read,
637
 
                  it will be converted to the indicated flavor. It can
638
 
                  take one of the next values:
639
 
 
640
 
                  <dl>
641
 
                    <dt>"NumArray"</dt> <dd>The elements in
642
 
                      dataset will be returned as
643
 
                      <tt class="verb">NumArray</tt> objects (from the
644
 
                      <tt class="verb">numarray</tt> package).
645
 
                    </dd>
646
 
                    <dt>"CharArray"</dt> <dd>The elements in
647
 
                      dataset will be returned as
648
 
                      <tt class="verb">CharArray</tt> objects (from the
649
 
                      <tt class="verb">numarray</tt> package).
650
 
                    </dd>
651
 
                    <dt>"String"</dt> <dd>The elements in the
652
 
                      dataset will be returned as Python
653
 
                      <tt class="verb">String</tt> objects of <em>fixed</em>
654
 
                      length (and not as <tt class="verb">CharArrays</tt>).
655
 
                    </dd>
656
 
                    <dt>"Numeric"</dt> <dd>The elements in the
657
 
                      dataset will be returned as
658
 
                      <tt class="verb">array</tt> objects (from the
659
 
                      <tt class="verb">Numeric</tt> package).
660
 
                    </dd>
661
 
                    <dt>"List"</dt> <dd>The elements in the
662
 
                      dataset will be returned as Python
663
 
                      <tt class="verb">List</tt> objects.
664
 
                    </dd>
665
 
                    <dt>"Tuple"</dt> <dd>The elements in the
666
 
                      dataset will be returned as Python
667
 
                      <tt class="verb">Tuple</tt> objects.
668
 
                    </dd>
669
 
                    <dt>"Object"</dt> <dd>The elements in the
670
 
                      dataset will be interpreted as pickled
671
 
                      (i.e. serialized objects through the use of the
672
 
                      <tt class="verb">Pickle</tt> Python module) objects and
673
 
                      returned as Python <em>generic</em>
674
 
                      objects. Only one of such objects will be
675
 
                      supported per entry. As the <tt class="verb">Pickle</tt>
676
 
                      module is not normally available in other
677
 
                      languages, this flavor won't be useful in
678
 
                      general.
679
 
                    </dd>
680
 
                    <dt>"VLString"</dt> <dd>The elements in the
681
 
                      dataset will be returned as Python
682
 
                      <tt class="verb">String</tt> objects of <em>any</em>
683
 
                      length, with the twist that <b>Unicode</b> strings are
684
 
                      supported as well (provided you use the <b>UTF-8</b> codification, see
685
 
                      below). However, only one of such objects will
686
 
                      be supported per entry.
687
 
                    </dd>
688
 
                  </dl>
689
 
                </dd>
690
 
 
691
 
                <dt>TITLE</dt> <dd>A string where the user can
692
 
                  put some description on what is this dataset used
693
 
                  for.
694
 
                </dd>
695
 
 
696
 
                <dt>VERSION</dt> <dd>Should contain the string
697
 
                  <tt class="verb">'1.1'</tt>.
698
 
                </dd>
699
 
 
700
 
              </dl>
701
 
            </div>
702
 
 
703
 
            <div>
704
 
              <h4 id="subsubsectionC.3.4.2">Storage Layout</h4>
705
 
 
706
 
              <p class="first">An <tt class="verb">VLArray</tt> has a <em>dataspace</em> with
707
 
                a <em>1-dimensional chunked</em> layout. 
708
 
              </p>
709
 
            </div>
710
 
 
711
 
            <div>
712
 
              <h4 id="subsubsectionC.3.4.3">Datatypes supported</h4>
713
 
 
714
 
              <p class="first">The datatype of the elements (rows) of
715
 
                <tt class="verb">VLArray</tt> objects must be the H5T_VLEN
716
 
                <em>variable-length</em> (or VL for short) datatype,
717
 
                and the base datatype specified for the VL datatype
718
 
                can be of any <em>atomic</em> HDF5 datatype that is
719
 
                listed in the <tt class="verb">Table</tt> format <a href="#TableFormatDescr">description
720
 
                section&nbsp;C.3.1</a>. That includes the classes:
721
 
              </p>
722
 
              <ul>
723
 
                <li>H5T_BITFIELD</li>
724
 
                <li>H5T_INTEGER</li>
725
 
                <li>H5T_FLOAT</li>
726
 
                <li>H5T_STRING</li>
727
 
                <li>H5T_ARRAY</li>
728
 
              </ul>
729
 
              <p>They can also be a H5T_COMPOUND datatype representing
730
 
                a complex number, see the <tt class="verb">Table</tt> format
731
 
                description in <a href="#TableFormatDescr">section&nbsp;C.3.1</a> for a detailed
732
 
                description.
733
 
              </p>
734
 
              <p>You should note that this does not include another VL
735
 
                datatype, or a compound datatype that does not fit the
736
 
                description of a complex number. Note as well that,
737
 
                for <tt class="verb">Object</tt> and <tt class="verb">VLString</tt>
738
 
                special flavors, the base for the VL datatype is
739
 
                always a H5T_NATIVE_UCHAR. That means that the
740
 
                complete row entry in the dataset has to be used in
741
 
                order to fully serialize the object or the variable
742
 
                length string.
743
 
              </p>
744
 
              <p>In addition, if you plan to use a
745
 
                <tt class="verb">VLString</tt> flavor for your text data and
746
 
                you are using ascii-7 (7 bits ASCII) codification for
747
 
                your strings, but you don't know (or just don't want)
748
 
                to convert it to the required UTF-8 codification, you
749
 
                should not worry too much about that because the ASCII
750
 
                characters with values in the range [0x00, 0x7f] are
751
 
                directly mapped to Unicode characters in the range
752
 
                [U+0000, U+007F] and the UTF-8 encoding has the useful
753
 
                property that an UTF-8 encoded ascii-7 string is
754
 
                indistinguishable from a traditional ascii-7 string.
755
 
                So, you will not need any further conversion in order
756
 
                to save your ascii-7 strings and have an
757
 
                <tt class="verb">VLString</tt> flavor.
758
 
              </p>
759
 
 
760
 
            </div>
761
 
          </div>        
762
 
 
763
 
        </div> 
764
 
 
765
 
      </div></div><div class="speedbar-bottom"><hr class="speedbar"><table class="speedbar"><tbody><tr><td style="text-align: left; width: 15%"><a href="usersguide8.html">previous</a></td><td style="text-align: center"><a href="usersguide.html#tb:table-of-contents">Table of Contents</a></td><td style="text-align: right; width: 15%"><a href="usersguide10.html">next</a></td></tr></tbody></table></div></body></html>
 
 
b'\\ No newline at end of file'