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

Home » Public Forums » archive » Re: read_ascii for many rows / possible to create automatic names for variables
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_ascii for many rows / possible to create automatic names for variables [message #57153 is a reply to message #57152] Wed, 05 December 2007 05:55 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bmey writes:

> as output from a spectrometer i obtain an ascii-file with many (more
> than 1024) columns and a few hundred rows. Most of the columns (1024
> of them) refer to a specific pixel of the spectrometer.
> Is there an effective way to read this file and to obtain each column
> as own variable? I do not want to type an own name for each of the
> columns, so i hope that there is a way to have a "dynamic name".
>
> Something like:
>
> data=read_ascii(file) & data=data.(0)
>
> pixel1=data(4,*)
> pixel2=data(5,*)
> ....
> pixel1024=data(1027,*)
>
> But to have idl to count from 1 to 1024.
>
> I hope it is possible to understand what i want to do.

I think you ought to be SURE that's what you want. It
doesn't sound like a good idea to me. Just read the
data all at once, and you have any column you like,
just as an index into the data array.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: array operations and memory consumption
Next Topic: pson + !p.multi + xyouts

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

Current Time: Sat Oct 11 05:08:58 PDT 2025

Total time taken to generate the page: 1.03827 seconds