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

Home » Public Forums » archive » Re: how to make it an array?
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: how to make it an array? [message #39160] Mon, 19 April 2004 09:47 Go to previous message
Gauri Kulkarni is currently offline  Gauri Kulkarni
Messages: 2
Registered: April 2004
Junior Member
Maybe what you are looking for is the procedure READCOL. It reads any file
with data in comlumn form. It ignores anything in that file that is not in
the column form. It usually comes with astronomy libraries, but very easy
to find on on the web and download. Here is a sample:

IDL> readcol,'random_catalog_xyz.dat',x,y,z
% Compiled module: READCOL.
% Compiled module: NUMLINES.
% READCOL: Format keyword not supplied - All columns assumed floating
point
% Compiled module: GETTOK.
% Compiled module: REPCHR.
% Compiled module: STRNUMBER.
% READCOL: 957153 valid lines read
IDL> array = transpose([[x],[y],[z]])
IDL> help,array
ARRAY FLOAT = Array[3, 957153]
IDL>

It took about 30 seconds to read those many rows. So it's fairly fast.
Hope this helps.

Gauri.



On Sun, 18 Apr 2004, Thomas Nehls wrote:

> Hi,
>
> as the result of calculations I produced a 3 column .dat-file . While
> using /APPEND and after calculation of some images of 400x400 the length
> of the file is about 1,000,000 rows.
>
> For further calculation I want to read the .dat-file(using read_ascii?)
> into an array. I already got the file read but the type is struct and
> the value is anonymus.
> How can I make it an array?
> Thanks
> Tom
>
>
[Message index]
 
Read Message
Read Message
Previous Topic: Test mail
Next Topic: Re: satellite orbit computation in IDL

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

Current Time: Thu Oct 09 22:38:51 PDT 2025

Total time taken to generate the page: 0.31790 seconds