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

Home » Public Forums » archive » Re: nCDF_Browser Updated to Support HDF Files
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: nCDF_Browser Updated to Support HDF Files [message #65281] Wed, 25 February 2009 07:32 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
James Kuyper writes:

> Within the context of HDF, "scientific dataset" refers to a particular
> kind of data that you can store in an HDF file. A scientific data set is
> a multi-dimensional named array of a single specific data type, to which
> can be attached a number of named attributes, each of which can be a
> one-dimensional array of a specific data type.
>
> Other things you can store in an HDF file include vdatas (essentially
> 1-dimension arrays of a structure type with a fixed layout; the vdata
> fields can be a mixture of different data types), vgroups, and images in
> 8-bit, 24-bit, and general raster formats, palettes, and annotations.

Thank you, James, for expanding on this topic. (I was getting
ready for work and only had time to be flippant.)

I would point out, too, that sorting out what is inside
an HDF file when you don't know much about it (the usual
case, I think), is not a trivial task. Presumably the
HDF_BROWSER code that comes with IDL can do it, but that
code isn't exposed to us mortals, so we can't see how it
is done. Reading the documentation, which is just about
the only alternative available to us, is a fool's errand.

Generally speaking, if you want to decipher what is in
an HDF file you scrounge around the Internet until you
find a scrap of code (usually written for IDL 5.2) that
does *almost* what you want it to do and you then beat it
into shape with whatever blunt instruments you have at your
disposal.

I've grown tired of doing this, so I've started to write my
own code for these kinds of things. But, it is a painful,
painful process, I can tell you.

Cheers,

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.")
Re: nCDF_Browser Updated to Support HDF Files [message #65282 is a reply to message #65281] Wed, 25 February 2009 07:14 Go to previous messageGo to next message
jameskuyper is currently offline  jameskuyper
Messages: 79
Registered: October 2007
Member
Brian Larsen wrote:
> Ahh,
>
> this is showing my supreme ignorance on HDF files.
>
>> As I am pretty sure I pointed out,
>> the HDF implementation I am using *currently* only supports
>> scientific datasets (SD).
>
> In my mind this is a scientific dataset, apparent that doesn't mean
> what I think it means :)

Within the context of HDF, "scientific dataset" refers to a particular
kind of data that you can store in an HDF file. A scientific data set is
a multi-dimensional named array of a single specific data type, to which
can be attached a number of named attributes, each of which can be a
one-dimensional array of a specific data type.

Other things you can store in an HDF file include vdatas (essentially
1-dimension arrays of a structure type with a fixed layout; the vdata
fields can be a mixture of different data types), vgroups, and images in
8-bit, 24-bit, and general raster formats, palettes, and annotations.
Re: nCDF_Browser Updated to Support HDF Files [message #65284 is a reply to message #65282] Wed, 25 February 2009 06:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Larsen writes:

> In my mind this is a scientific dataset, apparent that doesn't mean
> what I think it means :)

You are probably right in thinking it has something to do
with science, though. ;-)

Cheers,

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.")
Re: nCDF_Browser Updated to Support HDF Files [message #65285 is a reply to message #65284] Wed, 25 February 2009 06:34 Go to previous messageGo to next message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Ahh,

this is showing my supreme ignorance on HDF files.

> As I am pretty sure I pointed out,
> the HDF implementation I am using *currently* only supports
> scientific datasets (SD).

In my mind this is a scientific dataset, apparent that doesn't mean
what I think it means :)




Cheers,

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
Re: nCDF_Browser Updated to Support HDF Files [message #65307 is a reply to message #65285] Mon, 23 February 2009 18:06 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Brian Larsen writes:

> thanks much for updating this package. I have used it with pretty
> good success on nCDF files. Here is one of those HDF files that it
> doesn't work with:
> http://www.srl.caltech.edu/cgi-bin/dib/rundibviewmagswel2/AC E/ASC/DATA/level2/magswe?magswe_data_64sec_2379.hdf
> This is data from the ACE spacecraft.
>
> I use this code to read it, not sure why yours doesn't work, is the
> hdf missing metadata?

Well, this HDF file has *most* of it's information in
the form of VGroups. As I am pretty sure I pointed out,
the HDF implementation I am using *currently* only supports
scientific datasets (SD). I have plans for vGroups. In fact,
one of the files I want to read uses vGroups. But I am not
sure when I will get around to implementing it. I'll definitely
keep this file in mind as I work on this, since it has
annotations, too. :-)

Cheers,

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.")
Re: nCDF_Browser Updated to Support HDF Files [message #65315 is a reply to message #65307] Mon, 23 February 2009 07:49 Go to previous messageGo to next message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
David,

thanks much for updating this package. I have used it with pretty
good success on nCDF files. Here is one of those HDF files that it
doesn't work with:
http://www.srl.caltech.edu/cgi-bin/dib/rundibviewmagswel2/AC E/ASC/DATA/level2/magswe?magswe_data_64sec_2379.hdf
This is data from the ACE spacecraft.

I use this code to read it, not sure why yours doesn't work, is the
hdf missing metadata?
ncdf_browser runs on the file but only shows the filename/directory
and no more information.


vdataname = 'MAGSWE_data_64sec'
data = read_asc_hdf( filename, vdataname )

read_asc_hdf comes from the ACE team and is here:
http://www.srl.caltech.edu/ACE/ASC/DATA/level2/ACE-IDL-HDF.t xt




Cheers,

Brian

------------------------------------------------------------ --------------
Brian Larsen
Boston University
Center for Space Physics
http://people.bu.edu/balarsen/Home/IDL
Re: nCDF_Browser Updated to Support HDF Files [message #65351 is a reply to message #65281] Thu, 26 February 2009 10:46 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <MPG.240f1272d46c515b98a626@news.giganews.com>,
David Fanning <news@dfanning.com> wrote:

> I would point out, too, that sorting out what is inside
> an HDF file when you don't know much about it (the usual
> case, I think), is not a trivial task. Presumably the
> HDF_BROWSER code that comes with IDL can do it, but that
> code isn't exposed to us mortals, so we can't see how it
> is done. Reading the documentation, which is just about
> the only alternative available to us, is a fool's errand.

To oversimplify, HDF was created by programmers for scientists,
while netCDF was created by scientists who program. To see the
difference, simply count the number of HDF* and NCDF* routines
in IDL.

That's why I always use netCDF, when possible.

Admittedly, netCDF is not designed to handle irregular meshes,
for example. But for the vast majority of data sets, which
can be stored reasonably efficiently as multi-dimensional arrays,
netCDF is much easier to use. I actually teach netCDF to
beginners, but would not attempt to do so with HDF.

Cheers, Ken
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ActiveX calendar widget
Next Topic: Making MPEG movies on Windows

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

Current Time: Wed Oct 08 11:32:49 PDT 2025

Total time taken to generate the page: 0.00463 seconds