hyperslab clarification

I'm having difficulty understanding hyperslab selections, specifically in 3-dimensional datasets. I looked at https://www.hdfgroup.org/HDF5/Tutor/selectsimple.html for examples and they seem to work as intended. I didn't write code for those examples, I just used hdfview to create a test data set and h5dump to view it.

In my particular case, I have a dataset of dimensions (14400,2,165). I'm trying to select all elements at a given "row" of data (i.e. the same value for dimension 0) every 125 "rows". Based on the examples in the aforementioned tutorial, I thought this would be the right selection:

-s 61,0,0 (start/offset: first element of interest)
-S 125,1,1 (stride: every 125 elements along dimension 0)
-k 1,2,165 (block: all elements with the same dim0)
-c 2,1,1 (count: just two "rows" as a test)

What I'd expect to get back are elements
(61,0,0)..(61,0,165),(61,1,0)...(61,1,165)
(186,0,0)..(186,0,165),(186,1,0)...(186,1,165)

but instead what I get is
(61,0,0)..(61,0,165),(61,1,0)...(61,1,165)
(62,0,0)..(62,0,165),(62,1,0)...(62,1,165)

What am I doing wrong?

Hi John,

This looks like an h5dump bug. I entered bug HDFFV-9698 for the issue.
If works correctly if you specify the same parameters from a C application.

-Barbara
help@hdfgroup.org

···

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of johnk
Sent: Thursday, February 18, 2016 1:04 PM
To: HDF Users Discussion List
Subject: [Hdf-forum] hyperslab clarification

I'm having difficulty understanding hyperslab selections, specifically in 3-dimensional datasets. I looked at https://www.hdfgroup.org/HDF5/Tutor/selectsimple.html for examples and they seem to work as intended. I didn't write code for those examples, I just used hdfview to create a test data set and h5dump to view it.

In my particular case, I have a dataset of dimensions (14400,2,165).
I'm trying to select all elements at a given "row" of data (i.e. the same value for dimension 0) every 125 "rows". Based on the examples in the aforementioned tutorial, I thought this would be the right selection:

-s 61,0,0 (start/offset: first element of interest) -S 125,1,1 (stride: every 125 elements along dimension 0) -k 1,2,165 (block: all elements with the same dim0) -c 2,1,1 (count: just two "rows" as a test)

What I'd expect to get back are elements
(61,0,0)..(61,0,165),(61,1,0)...(61,1,165)
(186,0,0)..(186,0,165),(186,1,0)...(186,1,165)

but instead what I get is
(61,0,0)..(61,0,165),(61,1,0)...(61,1,165)
(62,0,0)..(62,0,165),(62,1,0)...(62,1,165)

What am I doing wrong?

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Thanks, Barbara. Out of curiosity, is the HDF bug tracker information available to the public? I couldn't find it poking around or searching with google.

···

On 02/23/2016 02:20 PM, Barbara Jones wrote:

Hi John,

This looks like an h5dump bug. I entered bug HDFFV-9698 for the issue.
If works correctly if you specify the same parameters from a C application.

-Barbara
help@hdfgroup.org

Hi John,

No, our bug tracking system is not open to the public. Feel free to send a message to the helpdesk if you ever want to check on a bug.
However, we are making changes so that we can allow this in the future and will announce it on the HDF-Forum when it is ready.

-Barbara
help@hdfgroup.org

···

-----Original Message-----
From: Hdf-forum [mailto:hdf-forum-bounces@lists.hdfgroup.org] On Behalf Of johnk
Sent: Thursday, February 25, 2016 9:39 AM
To: HDF Users Discussion List
Subject: Re: [Hdf-forum] hyperslab clarification

Thanks, Barbara. Out of curiosity, is the HDF bug tracker information available to the public? I couldn't find it poking around or searching with google.

On 02/23/2016 02:20 PM, Barbara Jones wrote:

Hi John,

This looks like an h5dump bug. I entered bug HDFFV-9698 for the issue.
If works correctly if you specify the same parameters from a C application.

-Barbara
help@hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5