Re: Saving HDF templates [message #13907] |
Mon, 04 January 1999 00:00 |
Vapuser
Messages: 63 Registered: November 1998
|
Member |
|
|
raph@phy.ornl.gov writes:
> Hi-
>
> Thanks for answering my previous question. As always, this just
> leads to another. I've figured out how to use HDF_BROWSER and HDF_READ to
> read in an HDF file. But that's about as far as the HDF documentation
> takes me. So I'm left with the following questions.
>
> How can I save the template which HDF_BROWSER generates? If I can save
> it, either in a .dat file which I can readf in with a procedure or in a form
> which I can put directly into a .pro (template = ...), I can automate some
> of this analysis. It seems to me that the template is just a structure,
> so both of these should be possible but my limited knowledge of structures
> has thus far thwarted my efforts. Any pointers?
>
I save the structure HDF_BROWSER generates to a IDL save set using
IDL> save, template_name,file='name.save'
Since the structure produced by HDF_BROWSER is a bit complicated and
uses pointers and such, this seemed the easiest way to solve the
problem. It does introduce a problem, in that you must know the
variable name of the template inside the save set inside of any
procedure/function that uses it. A small inelligance.
> On a related question, how do I get IDL to use the SD names I went
> to the trouble of putting in the HDF file, instead of defaulting to
> filename_SD_1 etc?
>
> Raph
>
Good question! I wish they'd do this too!
> ------------------------------------------------------------ -----------
> William Raphael Hix Email: raph@phy.ornl.gov
> Joint Institute for Heavy Ion Research Voice: (423) 576-8763
> Oak Ridge National Laboratory Fax: (423) 576-5780
> P.O. Box 2008
> Oak Ridge, TN 37831-6374
|
|
|
Re: Saving HDF templates [message #13908 is a reply to message #13907] |
Mon, 04 January 1999 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
raph@phy.ornl.gov wrote:
> Thanks for answering my previous question. As always, this just
> leads to another. I've figured out how to use HDF_BROWSER and HDF_READ to
> read in an HDF file. But that's about as far as the HDF documentation
> takes me. So I'm left with the following questions.
>
> How can I save the template which HDF_BROWSER generates? If I can save
> it, either in a .dat file which I can readf in with a procedure or in a form
> which I can put directly into a .pro (template = ...), I can automate some
> of this analysis. It seems to me that the template is just a structure,
> so both of these should be possible but my limited knowledge of structures
> has thus far thwarted my efforts. Any pointers?
>
> On a related question, how do I get IDL to use the SD names I went
> to the trouble of putting in the HDF file, instead of defaulting to
> filename_SD_1 etc?
A couple of resources which might help:
http://www.dfanning.com/tips/hdf_documentation.html contains a pointer
to David's HDF tips. His IDL book also contains a nice chapter on
working with HDF.
http://cimss.ssec.wisc.edu/~gumley/sds_read.html is a procedure I wrote
that allows you to read arbitrary HDF SDS datasets using either a GUI,
or a command line interface.
Cheers,
Liam.
|
|
|