Page tree

The license could not be verified: License Certificate has expired!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example uses the groups.h5 file that is created by the HDF5 Introductory Tutorial example h5_crtgrpar.c. To display  dset1  in the groups.h5 file below, specify dataset  /MyGroup/dset1 . The -H option is used to suppress printing of the data values:

...

You can obtain the h5ex_d_gzip.c program that created this file, as well as the file created, from the HDF5 C Examples by API page.

Anchor
dh5ls
dh5ls
h5ls

...

For a detailed understanding of how selections works, see the H5SselectH5S_hyperslabSELECT_HYPERSLAB API in the HDF5 Reference Manual.

...

The following datatypes are discussed, using the output of h5dump with HDF5 files from the HDF5 C Examples by API page:

...

This dataset is much more complex. Also note that subsetting cannot be done on Array datatypes.

See this FAQ for more information on the Array datatype.

...

An example of a Region Reference dataset ( h5ex_t_regref.h5 ) can be found on the C Examples by API page, under Datatypesunder Datatypes. If you examine this dataset with h5dump you will see that  /DS1  is a Region Reference dataset as indicated by its datatype, highlighted in grey bold below:

$ h5dump  h5ex_t_regref.h5
HDF5 "h5ex_t_regref.h5" {
GROUP "/" {
   DATASET "DS1" {
          DATATYPE  H5T_REFERENCE { H5T_STD_REF_DSETREG }
      DATASPACE  SIMPLE { ( 2 ) / ( 2 ) }
      DATA {
         DATASET /DS2 {(0,1), (2,11), (1,0), (2,4)},
         DATASET /DS2 {(0,0)-(0,2), (0,11)-(0,13), (2,0)-(2,2), (2,11)-(2,13)}
      }
   }
   DATASET "DS2" {
      DATATYPE  H5T_STD_I8LE
      DATASPACE  SIMPLE { ( 3, 16 ) / ( 3, 16 ) }
      DATA {
      (0,0): 84, 104, 101, 32, 113, 117, 105, 99, 107, 32, 98, 114, 111, 119,
      (0,14): 110, 0,
      (1,0): 102, 111, 120, 32, 106, 117, 109, 112, 115, 32, 111, 118, 101,
      (1,13): 114, 32, 0,
      (2,0): 116, 104, 101, 32, 53, 32, 108, 97, 122, 121, 32, 100, 111, 103,
      (2,14): 115, 0
      }
   }
}
}

...

  • A selection of four individual elements in dataset  /DS2 :   (0,1), (2,11), (1,0), (2,4) 
    See the H5SselectH5S_elementsSELECT_ELEMENTS API in the HDF5 User's Guide for information on selecting individual elements.

  • A selection of these blocks in dataset  /DS2 : (0,0)-(0,2), (0,11)-(0,13), (2,0)-(2,2), (2,11)-(2,13) 
    See the H5SselectH5S_hyperslabSELECT_HYPERSLAB API in the HDF5 User's Guide for how to do hyperslab selection.

...

These start, stride, count, and block values will select the elements shown in grey bold in the dataset:

 84 104 101 32 113 117 105  99 107  32  98 114 111 119 110 0
102 111 120 32 106 117 109 112 115  32 111 118 101 114  32 0
116 104 101 32  53  32 108  97 122 121  32 100 111 103 115 0

 

If you use h5dump to select a subset of dataset  /DS2  with these start, stride, count, and block values, you will see that the same elements are selected:

...

For more information on selections, see the tutorial topic on Reading From or Writing To a Subset of a Dataset. Also see the View Dataset Subset tutorial topic on using h5dump to view a subset.

...