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

Home » Public Forums » archive » Re: HDF5 Output in IDL
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: HDF5 Output in IDL [message #68648] Mon, 09 November 2009 07:11 Go to previous message
Juggernaut is currently offline  Juggernaut
Messages: 83
Registered: June 2008
Member
On Nov 8, 9:08 pm, David Fanning <n...@dfanning.com> wrote:
> Folks,
>
> Does anyone have an example of how to go about writing
> simple IDL variables to an HDF5 file with some variable
> attributes?
>
> Thanks,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

A very simple way is shown in the IDL help for h5_create.

simpleVariable = dblarr(10)
nels = n_elements(simpleVariable)
type = 'Double'
attr = {_TYPE:'Attribute', _DATA:{size: nels, type: type}}
dataset = {_Name: 'simpleVariable', _TYPE:'Dataset',
_DATA:simpleVariable, PROPERTIES:attr}
h5_create, dialog_pickfile(), dataset

If you know what you want your hdf5 structure to look like then it
becomes pretty simple to basically
build your IDL structure to look exactly the same way.

Not entirely sure if you were looking for something else but it's an
answer none-the-less
[Message index]
 
Read Message
Read Message
Previous Topic: Re: small caps in Hershey font
Next Topic: Re: IDL_PATH problems

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

Current Time: Fri Oct 10 21:54:08 PDT 2025

Total time taken to generate the page: 0.00761 seconds