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

Home » Public Forums » archive » Re: importing ascii files
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
Re: importing ascii files [message #31444] Thu, 11 July 2002 15:29
mperrin+news is currently offline  mperrin+news
Messages: 81
Registered: May 2001
Member
Heather <lehmann_heather@hotmail.com> wrote:
> We have a program written in IDL that extracts data and puts it into a
> text file. We want to put the columns of the text file into some kind
> of storage device so that we can access the columns separately in
> another IDL program. We are trying to write a program that
> incorporates the import_ascii macro, but are open to any other ideas
> at this point.

The Goddard IDL Astro library has a "readcol" function which may be suitable
for your purposes.

- Marshall
Re: importing ascii files [message #31445 is a reply to message #31444] Thu, 11 July 2002 14:51 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Heather wrote:
>
> We have a program written in IDL that extracts data and puts it into a
> text file. We want to put the columns of the text file into some kind
> of storage device so that we can access the columns separately in
> another IDL program. We are trying to write a program that
> incorporates the import_ascii macro, but are open to any other ideas
> at this point.
>
> Heather

Dear Heather,

import_ascii will be very slow by large arrays because it
reads not the whole data as an array.
And if you later like to use it by runtime it won't work
because the structure is defined by execute.


Before read_ascii was developed by RSI I have written
a full automatic data reader.
It founds itselfs where comments and data are.
It reads all data which is organized with comments, columns of numbers
and probably at the end comments again.

The result could be something like this:

; EXAMPLE:
; result=read_data_file('dat.txt')
; help,result,/str
;** Structure <135d458>, 5 tags, length=104, refs=1:
; FILE STRING 'dat.txt'
; SEPARATOR STRING ','
; DATA DOUBLE Array[3, 3]
; COMMENTS LONG 1
; HEADER STRING Array[1]

You'll find it here:
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/read_data_file.tar.gz


regards

Reimar









--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
============================================================ =======
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: importing ascii files
Next Topic: interactive polar blobby plots

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

Current Time: Wed Oct 08 19:19:00 PDT 2025

Total time taken to generate the page: 0.00546 seconds