Re: nCDF_Browser Updated to Support HDF Files [message #65281] |
Wed, 25 February 2009 07:32  |
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   |
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 #65307 is a reply to message #65285] |
Mon, 23 February 2009 18:06   |
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 #65351 is a reply to message #65281] |
Thu, 26 February 2009 10:46  |
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
|
|
|