Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <first.last@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: reading HDF5 dataset subset
Date: Tue, 03 Nov 2009 16:11:07 -0500
Organization: TMW
Lines: 26
Message-ID: <op.u2t7stjka5ziv5@uthamaa.dhcp.mathworks.com>
References: <hcnllp$lv2$1@fred.mathworks.com>
 <op.u2t4zlc7a5ziv5@uthamaa.dhcp.mathworks.com>
 <hcq5bl$smu$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257282667 27844 172.31.57.126 (3 Nov 2009 21:11:07 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Nov 2009 21:11:07 +0000 (UTC)
User-Agent: Opera Mail/10.01 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:582174


On Tue, 03 Nov 2009 15:55:17 -0500, Tess  <tess.brandon@noaa.gov> wrote:

> I think you hit on it with #4 -- I didn't know how to set the memory  
> space.
>
> Apologies for accidentally leaving out the "_hyperslab" in  
> "H5S.select_hyperslab" when copying from my workspace.
>
> Just to be clear, I already wrote these files to be chunked -- that's  
> not the issue.  The issue is whether a file needs to be written with  
> hyperslabs in order to use H5S.select_hyperslab, etc. to read  
> hyperslabs?  Should I be using H5S.select_elements instead if I wrote  
> the dataset to the file in one piece originally?

I am curious to know why you enabled chunking when you were writing?

I hope you got my point earlier that chunking and hyperslabs are not the  
same. Chunking has to do with how HDF5 library internally organizes parts  
of the dataset. Hyperslab concept is at the application level, it is  
independent of the chunking in the file.

Have a quick look at '4.5 Storage strategies' here  
http://www.hdfgroup.org/HDF5/doc/UG/UG_frame10Datasets.html

You can use any of he selection/read methods (hyperslab/elements) on a  
HDF5 file irrespective of how it was written/chunked.