help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hdf file attributes


From: Stewart Dickson
Subject: Re: hdf file attributes
Date: Mon, 08 Nov 2010 17:16:56 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

Hello, Dr. Thomas:

If you compare: http://octave.1599824.n4.nabble.com/read-data-subsets-from-HDF5-td2713674.html
Octave-General "read data subsets from HDF5" with the HDF Group's MATLAB examples, you will see two very different styles of accessing HDF data files.

MATLAB's HDF package contains the functions: H5F.open, H5D.open (file_id, DATAFIELD_NAME),
    H5D.get_space (data_id), H5D.read, H5S.close (data_space),
    H5A.open_name (data_id, ATTRIBUTE), H5A.read(attr_id), …
These allow you to parse named data fields and attributes from the HDF file before reading large amounts of data.

Octave's load -hdf5  function reads the entire file then requires the suer to parse the data fields from the structure
Octave creates in memory.

-Stewart Dickson, HDF Group

On:        Brian Thomas-2 wrote:
I'm trying to use an HDF5 file in Octave 3.2.4.  I can read in the file using load('-hdf5',file), but I don't know how to access the file attributes.

I have a Matlab code that does it this way:

hdr=hdfinfo(filename);
file_attributes=hdr.Attributes;
Nmost_lat=file_attributes(39).Value;

I haven't been able to find equivalent commands in Octave.

@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@
Dr. Brian Thomas
Assistant Professor of Physics and Astronomy, Washburn University
@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@address@hidden@

reply via email to

[Prev in Thread] Current Thread [Next in Thread]