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

Home » Public Forums » archive » HDF SDS array access 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: HDF SDS array access in IDL [message #13276 is a reply to message #13178] Tue, 27 October 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
William Clodius (wclodius@lanl.gov) writes:

> I am confused by some comments in the IDL documentation for HDF file
> access e.g., the documentation for HDF_SD_GETDATA
>
> "The HDF_SD_GETDATA procedure retrieves a hyperslab of values from an SD
> dataset. By default, the retrieved data is transposed from HDF's column
> order format into IDL's row order which is more efficient in IDL. To
> retrieve the dataset without this transposition, set the NOREVERSE
> keyword."
>
> I believe that IDL, like Fortran, is column major and transposing the
> data would be exactly the wrong thing to do for the default. Am I
> mistaken or has a misguided C programmer been at work at RSI?

I think the problem here is that William changes the
"column order" words of the writer to "column major"
and misinterprets what is meant. Since I am *always*
confused about what "column major" means, I'll tell you
what I *do* know. :-)

IDL stores information in a row-order format. That is
to say that in memory row elements are contiguous. HDF
apparently stores information in a column-order format,
so that column elements are contiguous.

Does this matter? Most of the time, not a whit. It has
nothing to do with how columns or rows are specified
in variables, or whether the column notation is first
or second. Where it does matter is if you are doing
something in a loop. If data is stored row-ordered
and you loop over a column index, the loop can be
quite slow, since you have to grab successive chunks
of memory that are not next to each other.

Thus, I think it is a good thing to allow IDL to
do the switch for you. Saves you having to remember
yet one more thing as you work with the data.

Cheers,

David

WARNING: My brain is still several time zones away
from being completely engaged, so my confidence level
in this answer is somewhat lower than my normal 50
percent. :-)

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL licenses in Windows
Next Topic: Re: Multiple file selector?

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

Current Time: Sat Oct 11 11:04:43 PDT 2025

Total time taken to generate the page: 0.08330 seconds