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

Home » Public Forums » archive » Read data as array structure
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: Read data [message #79263 is a reply to message #79202] Sun, 19 February 2012 11:07 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
Based on the file Dave showed me, it seems that it is always one
record per line, with 13 fields per record, with records separated by
whitespace. I could read the file into a nice 13,52 array with

lines=strarr(file_lines('psi_input.txt'))
openr,unit,'psi_input.txt',/get_lun
readf,unit,lines
free_lun,unit
slines=strsplit(lines,/extract)
linesarr=transpose(slines.toarray())

From there you can convert some columns into other types. I am
guessing some would be integers, some would be reals.


On Feb 18, 11:31 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Feb 18, 1:26 am, DavePoreh <d.po...@gmail.com> wrote:
>
>> as you can see, i have different format per each line (Number- date
>> (15-Oct-2003)- file address , etc.) i just need to read this file and
>> then call it during my code.
>
> Actually I cannot see. I do not know where the line breaks are in the
> file or just show up because of the message. Can you make the file (or
> a few lines of it) available somewhere?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Read data
Next Topic: Quickbird RPC

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

Current Time: Wed Oct 08 17:56:49 PDT 2025

Total time taken to generate the page: 0.00440 seconds