如何在终端上使用 h5dump 显示值的范围
How to display range of values using h5dump on terminal
我正在尝试使用 h5dump
命令打印值的范围。
我的数据集是 3 维数据(X 轴、Y 轴和 Z 轴),假设我想打印显示特定 X 轴的所有数据值。
下面是我执行的命令:
h5dump -d X --start="2" file.hdf5
结果:
HDF5 "file.hdf5" {
DATASET "X" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 10, 10, 10 ) / ( 10, 10, 10 ) }
SUBSET {
START ( 2, 0, 0 );
STRIDE ( 1, 1, 1 );
COUNT ( 1, 1, 1 );
BLOCK ( 1, 1, 1 );
DATA {
(2,0,0): -0.443565
}
}
}
}
我尝试将 count
参数用作:
h5dump -d X --start="2" --count="10,10" file.hdf5
结果:
HDF5 "file.hdf5" {
DATASET "X" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 10, 10, 10 ) / ( 10, 10, 10 ) }
SUBSET {
START ( 2, 0, 0 );
STRIDE ( 1, 1, 1 );
COUNT ( 10, 10, 0 );
BLOCK ( 1, 1, 1 );
DATA {
}
}
}
}
但是没有显示任何数据。
问题已通过提供 3 维格式的 count
属性解决,如下所示:
h5dump -d X --start="2" --count="1,10,10" file.hdf5
结果:
HDF5 "file.hdf5" {
DATASET "X" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 10, 10, 10 ) / ( 10, 10, 10 ) }
SUBSET {
START ( 2, 0, 0 );
STRIDE ( 1, 1, 1 );
COUNT ( 1, 10, 10 );
BLOCK ( 1, 1, 1 );
DATA {
(2,0,0): -0.443565, 0.093538, -0.046598, -0.390718, -0.40143, -0.75803,
(2,0,6): 0.200715, 0.717508, 0.449602, -0.027501,
(2,1,0): 0.633949, 0.010584, 0.211322, -0.268771, -0.287361, -0.022143,
(2,1,6): -0.078199, 0.125665, 0.143302, -0.337159,
(2,2,0): -0.579271, -0.079719, -0.402029, 0.017853, 0.057314, 0.741759,
(2,2,6): -0.159521, -0.002631, 0.465817, 0.106915,
(2,3,0): 0.173458, 0.261899, 0.244239, -0.057464, 0.638488, 0.406673,
(2,3,6): 0.057691, 0.220089, 0.31774, -0.044191,
(2,4,0): -0.307582, -0.51839, 0.407623, -0.023077, 0.598121, 0.076373,
(2,4,6): 0.213476, 0.629848, 0.199875, -0.55026,
(2,5,0): 0.272402, 0.141062, -0.445451, 0.154252, 0.512982, 0.296819,
(2,5,6): 0.394003, 0.195487, -0.381298, 0.233568,
(2,6,0): 0.250801, 0.648142, 0.129092, -0.277806, -0.327215, 0.592183,
(2,6,6): 0.070691, 0.173107, -0.689989, 0.075781,
(2,7,0): 0.1983, -0.101234, -0.256516, -0.074656, -0.254037, -0.131074,
(2,7,6): 0.169034, 0.636948, -0.745117, 0.026536,
(2,8,0): 0.400796, 0.236168, -0.791067, -0.360954, -0.423373, 0.063263,
(2,8,6): 0.533191, 0.795309, 0.183088, -0.522514,
(2,9,0): 0.924088, 0.740839, -0.027343, -0.659531, 0.496281, 0.639562,
(2,9,6): 0.116791, 0.802226, 1.0194, -0.825602
}
}
}
}
我正在尝试使用 h5dump
命令打印值的范围。
我的数据集是 3 维数据(X 轴、Y 轴和 Z 轴),假设我想打印显示特定 X 轴的所有数据值。
下面是我执行的命令:
h5dump -d X --start="2" file.hdf5
结果:
HDF5 "file.hdf5" {
DATASET "X" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 10, 10, 10 ) / ( 10, 10, 10 ) }
SUBSET {
START ( 2, 0, 0 );
STRIDE ( 1, 1, 1 );
COUNT ( 1, 1, 1 );
BLOCK ( 1, 1, 1 );
DATA {
(2,0,0): -0.443565
}
}
}
}
我尝试将 count
参数用作:
h5dump -d X --start="2" --count="10,10" file.hdf5
结果:
HDF5 "file.hdf5" {
DATASET "X" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 10, 10, 10 ) / ( 10, 10, 10 ) }
SUBSET {
START ( 2, 0, 0 );
STRIDE ( 1, 1, 1 );
COUNT ( 10, 10, 0 );
BLOCK ( 1, 1, 1 );
DATA {
}
}
}
}
但是没有显示任何数据。
问题已通过提供 3 维格式的 count
属性解决,如下所示:
h5dump -d X --start="2" --count="1,10,10" file.hdf5
结果:
HDF5 "file.hdf5" {
DATASET "X" {
DATATYPE H5T_IEEE_F32LE
DATASPACE SIMPLE { ( 10, 10, 10 ) / ( 10, 10, 10 ) }
SUBSET {
START ( 2, 0, 0 );
STRIDE ( 1, 1, 1 );
COUNT ( 1, 10, 10 );
BLOCK ( 1, 1, 1 );
DATA {
(2,0,0): -0.443565, 0.093538, -0.046598, -0.390718, -0.40143, -0.75803,
(2,0,6): 0.200715, 0.717508, 0.449602, -0.027501,
(2,1,0): 0.633949, 0.010584, 0.211322, -0.268771, -0.287361, -0.022143,
(2,1,6): -0.078199, 0.125665, 0.143302, -0.337159,
(2,2,0): -0.579271, -0.079719, -0.402029, 0.017853, 0.057314, 0.741759,
(2,2,6): -0.159521, -0.002631, 0.465817, 0.106915,
(2,3,0): 0.173458, 0.261899, 0.244239, -0.057464, 0.638488, 0.406673,
(2,3,6): 0.057691, 0.220089, 0.31774, -0.044191,
(2,4,0): -0.307582, -0.51839, 0.407623, -0.023077, 0.598121, 0.076373,
(2,4,6): 0.213476, 0.629848, 0.199875, -0.55026,
(2,5,0): 0.272402, 0.141062, -0.445451, 0.154252, 0.512982, 0.296819,
(2,5,6): 0.394003, 0.195487, -0.381298, 0.233568,
(2,6,0): 0.250801, 0.648142, 0.129092, -0.277806, -0.327215, 0.592183,
(2,6,6): 0.070691, 0.173107, -0.689989, 0.075781,
(2,7,0): 0.1983, -0.101234, -0.256516, -0.074656, -0.254037, -0.131074,
(2,7,6): 0.169034, 0.636948, -0.745117, 0.026536,
(2,8,0): 0.400796, 0.236168, -0.791067, -0.360954, -0.423373, 0.063263,
(2,8,6): 0.533191, 0.795309, 0.183088, -0.522514,
(2,9,0): 0.924088, 0.740839, -0.027343, -0.659531, 0.496281, 0.639562,
(2,9,6): 0.116791, 0.802226, 1.0194, -0.825602
}
}
}
}