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

Home » Public Forums » archive » [Q] Reading from file, speed
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
[Q] Reading from file, speed [message #18914] Thu, 10 February 2000 00:00
Koen Janssens is currently offline  Koen Janssens
Messages: 3
Registered: February 2000
Junior Member
I am looking for a better way to import data into IDL, the one I am
using now seems very slow (about 20 secs for reading in 2 MBytes). Here
is the script that I use:

openr, ms_dat_unit, ms_dat_file
ms = bytarr(dimx,dimy,dimz)
for z = 0,(dimz-1) do begin
for y = 0,(dimy-1) do begin
for x = 0,(dimx-1) do begin
readu, ms_dat_unit, tmp
ms[x,y,z] = tmp
endfor
endfor
endfor
close, ms_dat_unit
free_lun, ms_dat_unit

The file I am reading contains integers in binary format (volume data
128^3).

Any help is appreciated.
Koen
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: [Q] Reading from file, speed
Next Topic: IDL 5.3 on NT newbie annoyances

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

Current Time: Fri Oct 10 18:40:36 PDT 2025

Total time taken to generate the page: 0.80008 seconds