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

Home » Public Forums » archive » Re: Using ASSOC function
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: Using ASSOC function [message #12130] Thu, 02 July 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
I wrote a little while ago:

> Bernard Puc (puc@gsfc.nasa.gov) writes:
>
>> Using ASSOC, I can access an image array stored in a datafile. Is it
>> possible to instead select a subimage of that array? I'm looking to
>> optimize the file access speed by not having to read the entire file or
>> array into a variable. Thanks in advance.
>
> If you are asking if you can do this:
>
> file = FilePath(SubDir=['examples', 'data'], 'cereb.dat')
> OpenR, lun, file, /Get_Lun
> images = Assoc(lun, BytArr(512, 512))
> thisPartImage = (images(0))[0:255,256:512]
> Help, thisPartImage
> TV, thisPartImage
>
> Then the answer, amazingly enough, is yes.

Ali Bahrami from RSI confirms what I suspected might be the
case with this: the entire image is first read and then that
temporary variable is subset to give the partial image.
To make things a lot faster, you would need to use Point_Lun
in conjunction with ReadU, you would need to keep track of a
lot of information, and you would have to be aware of the way
the information was actually stored in memory. All in all, it
is probably easier to purchase a faster computer.

But even though it doesn't speed things up, I'm still impressed
that works. Although knowing that the whole image is
read certainly takes some of the mystery out of it. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Determining machine endian-ness
Next Topic: Re: Polynomial warping of satellite images

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

Current Time: Sat Oct 11 21:58:26 PDT 2025

Total time taken to generate the page: 0.16242 seconds