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

Home » Public Forums » archive » Re: Pb to work with huge 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: Pb to work with huge files [message #34620] Thu, 10 April 2003 09:56 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Pavel Romashkin (pavel_romashkin@hotmail.com) writes:

> Slow, isn't it? Couldn't one load like 1/3 of it into ram, process it
> and write back? I am no expert with assoc.

Slow!? With Associated variables you don't read *anything*
into memory until you actually use it. Note only is it
fast, it is about as efficient as it is possible to get!

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Pb to work with huge files [message #34622 is a reply to message #34620] Thu, 10 April 2003 09:39 Go to previous messageGo to next message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
David Fanning wrote:
>
> Why don't you just open the file for Updating (OPENU).
> Then you could just perform the file manipulation
> in place and close the file with the new information
> built right into it.

Slow, isn't it? Couldn't one load like 1/3 of it into ram, process it
and write back? I am no expert with assoc.

Pavel
Re: Pb to work with huge files [message #34625 is a reply to message #34622] Thu, 10 April 2003 06:09 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
St�phane writes:

> I have a huge multiband file (i.e. 4800*2200*150) and I would like to
> perform a procedure that could write a file with the same dimensions:
> 1. openr: to open the input file
> 2. assoc: to extrac some images on which I would like to work
> 3. replace extracted images in the same place
> 4. write the output file
> My problem is that I can't create a 4800*2200*150 "integer array",
> because I haven't enought memory.
>
> Is there another way to write file like that?

Why don't you just open the file for Updating (OPENU).
Then you could just perform the file manipulation
in place and close the file with the new information
built right into it.

OPENU, lun, filename, /Get_Lun
data = Assoc(lun, INTARR(4800,2200))
image = data(55)
newImage = Hist_Equal(image)
data(55) = newImage
Free_lun, lun

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Pb to work with huge files [message #34759 is a reply to message #34620] Thu, 10 April 2003 14:21 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
David Fanning wrote:
>
> Slow!? With Associated variables you don't read *anything*
> into memory until you actually use it. Note only is it
> fast, it is about as efficient as it is possible to get!

I thought seek is one of the slowest hardware functions of hard drives.
Continuous read is much faster, although with cache it may be
insignificant. I thought if you wanted to do a lot of random HD access
then seeking would slow things down.
I may be wrong! And indeed this is purely theoretical argument.

Pavel
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: sec : U Re: Proper pointer cleanup question
Next Topic: Re: IDL failure after OS X 10.2 update

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

Current Time: Wed Oct 08 13:05:22 PDT 2025

Total time taken to generate the page: 0.00836 seconds