Re: Read several files into one big data array? [message #89512 is a reply to message #89511] |
Wed, 22 October 2014 15:49   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
lucesmm@gmail.com writes:
> The title works great!. But now I having ploblem with the lunit number ( LUNs) becuase I think it is only allow to have 1-99.
> But I have over 700 files... Any idea what to do then?
Oh, dear! You probably only need two of these, at most. One to read the
data files (closing it after reading each file) and one to write the
results to the output file.
Something like this:
outLun = Get_Lun()
FOR j=0,numFiles-1 DO BEGIN
thisFile = files[j]
OpenR, inLun, thisFile, /Get_Lun
ReadF, inLun, ....
Free_Lun, inLun
... whatever you do to manipulate the data here
PrintF, outLun, manipulatedData
ENDFOR
Free_Lun, outLun
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|