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

Home » Public Forums » archive » Re: HDF_Browser Woes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: HDF_Browser Woes [message #53793] Thu, 03 May 2007 10:21 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Richard Edgar writes:

> Knowing what's supposed to be in the file would be a good start :-)

Indeed, but if the folks coming to me knew that, they
wouldn't be coming to me, would they? :-)

Their problem (and, by extension, mine) is that they
don't know jack. We are both trying desperately to
find out. But the tools, uh, seem to be fighting us. :-)

Cheers,

David

P.S. I am making some progress on this problem. I downloaded
HDFView this morning, and by looking at a combination of
that and HDF_BROWSER and some of Liam's excellent programs,
I am beginning to piece things together. But progress is
glacial, I'm afraid... (Humm. Not as good a metaphor as
it used to be, according to my recent reading.)


--
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.")
Re: HDF_Browser Woes [message #53795 is a reply to message #53793] Thu, 03 May 2007 10:08 Go to previous messageGo to next message
Richard Edgar is currently offline  Richard Edgar
Messages: 8
Registered: February 2006
Junior Member
David Fanning wrote:
> Benjamin Hornberger writes:
>
>> I can tell you how (little) I used hdf_read(). I believe hdf_browser()
>> can produce a template to subsequently open several files of the same
>> type / structure with hdf_read() without going through what I describe
>> below each time.
>
> Ooohhhh! Humm, I didn't even know there was a connection
> between HDF_BROWSER and HDF_READ. I probably should have
> read the documentation instead of assuming this would
> work intuitively. :-)

Indeed, HDF_BROWSER is to HDF_READ as ASCII_TEMPLATE is to READ_ASCII. I
have a simple routine which uses the template produced:

PRO ReadHDF,filename,struct
; Simple procedure to read an HDF file

RESTORE,FILENAME='template.dat'
struct = HDF_READ(filename,TEMPLATE=template)

END

where 'template.dat' contained a template previously SAVEd from HDF_BROWSER.

It's been a while since I used HDF_BROWSER, so I can't remember how to
use it exactly.... it's certainly not as intuitive as ASCII_TEMPLATE.
Knowing what's supposed to be in the file would be a good start :-) The
fields should at least be named within the HDF file.

Richard
Re: HDF_Browser Woes [message #53798 is a reply to message #53795] Thu, 03 May 2007 09:49 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> I can tell you how (little) I used hdf_read(). I believe hdf_browser()
> can produce a template to subsequently open several files of the same
> type / structure with hdf_read() without going through what I describe
> below each time.

Ooohhhh! Humm, I didn't even know there was a connection
between HDF_BROWSER and HDF_READ. I probably should have
read the documentation instead of assuming this would
work intuitively. :-)

Cheers,

David

P.S. Is it just me or is HDF_BROWSER just a bit misleading
as a name? Perhaps I shouldn't have tried H5_BROWSER first.
This gave me the entirely wrong idea of what HDF_BROWSER
was all about. :-(

--
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.")
Re: HDF_Browser Woes [message #53800 is a reply to message #53798] Thu, 03 May 2007 09:21 Go to previous messageGo to next message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
David Fanning wrote:
> Folks,
>
> Does anyone have the foggiest idea of how HDF_BROWSER works?
> I'm trying to figure out what is in an unknown HDF file.
> When I select the READ button, something is returned,
> but I can make no sense of it whatsoever. Help (or suggestions
> for using something OTHER than HDF_BROWER) is appreciated.

I can tell you how (little) I used hdf_read(). I believe hdf_browser()
can produce a template to subsequently open several files of the same
type / structure with hdf_read() without going through what I describe
below each time.

I open hdf_read() and pick a file. The text field on the upper left
tells you what's in the file (attributes, datasets etc.), which you can
select by doubleclicking. You can also use the dropdown list to show
only a selection. If you select an attribute, dataset or whatever, you
can preview it in the window on the upper right. The preview is kind of
limited, however. For example, byte/char arrays representing strings are
plotted (funny, isn't it?) in one netCDF file I am testing right now
(yes, it also supports netCDF).

In the lower half of the window, once you have selected an attribute /
dataset / whatever, you can choose to extract (read) it and give a name.
Once you click OK, the return value of hdf_read() is a structure with
the fields containing the stuff you have extracted (read). For example,
if you do

data=hdf_read(file)

and then extract attribute 1 as 'a' and dataset 2 as 'b', in the end
you'll have a structure 'data' with fields 'a' and 'b'.

Hope that helps,
Benjamin
Re: HDF_Browser Woes [message #53801 is a reply to message #53800] Thu, 03 May 2007 09:12 Go to previous messageGo to next message
MarioIncandenza is currently offline  MarioIncandenza
Messages: 231
Registered: February 2005
Senior Member
> but I can make no sense of it whatsoever. Help (or suggestions
> for using something OTHER than HDF_BROWER) is appreciated.

Liam Gumley's SDS_READ is certainly worth a try. Calling sequence for
gathering information about HDF file contents is:

IDL> sds_read,filename,null,/info

Hope this helps,

Edward H.
Re: HDF_Browser Woes [message #53889 is a reply to message #53793] Thu, 03 May 2007 10:58 Go to previous message
Richard Edgar is currently offline  Richard Edgar
Messages: 8
Registered: February 2006
Junior Member
David Fanning wrote:
> Richard Edgar writes:
>
>> Knowing what's supposed to be in the file would be a good start :-)
>
> Indeed, but if the folks coming to me knew that, they
> wouldn't be coming to me, would they? :-)
>
> Their problem (and, by extension, mine) is that they
> don't know jack. We are both trying desperately to
> find out. But the tools, uh, seem to be fighting us. :-)

Sorry... my head is spinning..... they don't have a clue what's supposed
to be in the file (in any way, shape or form), yet they know that they
need to read it????

Richard
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: how to force idl to export data in one line?
Next Topic: Re: Graphics pipeline (was Re: crazy contour)

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

Current Time: Wed Oct 08 13:45:56 PDT 2025

Total time taken to generate the page: 0.00646 seconds