comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Appending data to a dataset in an HDF5 file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Appending data to a dataset in an HDF5 file [message #52536 is a reply to message #52400] Mon, 05 February 2007 02:35 Go to previous messageGo to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Feb 2, 3:54 pm, eddie haskell <hask...@nospam.edu> wrote:

> By defining a new dataspace you can write only the data to any portion
> of the dataset you need without wasting memory.
>
> ;; extend dataset by two elements
> h5d_extend, d, 12
> ;; get updated matching dataspace
> ds2 = h5d_get_space(d)
> ;; mark only needing to write to the last two elements
> h5s_select_hyperslab, ds2, 10, 2, /reset
>
> ;; create data to write
> data = [100b, 200b]
> ;; create dataspace for writing
> ds3 = h5s_create_simple(2)
> ;; write only the new elements to the dataset
> h5d_write, d, data, file_space=ds2, memory_space=ds3
>
> Sorry for the confusion.

Nothing to be sorry about, this post is already much easier to
understand than the IDL documentation. When I find the time to add
this to my simple HDF5 writer, I'll include this, and perhaps prepare
a simple article for the Coyote, for others to enjoy.

Thanks,

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL job opportunities
Next Topic: image mapping

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:13:25 PDT 2025

Total time taken to generate the page: 0.00519 seconds