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

Home » Public Forums » archive » readcol procedure
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: readcol procedure [message #32106 is a reply to message #32020] Tue, 10 September 2002 23:33 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Don J Lindler wrote:
> "shih I Chun" <icshih@astro.soton.ac.uk> wrote in message
> news:all9bs$9pp$1@aspen.sucs.soton.ac.uk...
>
>> Hi,
>>
>> READCOL is a procedure in the IDL Astronomy Library. I usually use it to
>> read ASCII files for further analysis.
>>
>> The program also indeicates the amount of lines in the file. My question
>> then is how to retrieve this information so that I can use it in my
>> own program?
>>
>
>
>
> If you are only interested in how many valid lines are read, try:
>
> readcol, 'filename', var1, ...
> nlines = n_elements(var1)
>
> Good luck,
> Don
>
>


Dear all

this routine is platform dependent because it uses a unix shell command.
I like unix but it's not a problem for idl to determine this itselfs.

Perhaps you can try the routine file_line I have defined in 1996 and
which was improved later by Paul Krummel. You can find this routine by
David at http://www.dfanning.com/tip_examples/file_line.pro

Or the master one at our icg library.
The improvements are different. (Paul has added a lot of comments)

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/fileline.tar.gz
or as idl 5.5 binary
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/fileline.sav

If you have a look at the actual Ascii import thread you get much more
diskussions about this theme.

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/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
[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
Previous Topic: duplicate .pro filenames
Next Topic: Re: duplicate .pro filenames

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

Current Time: Wed Oct 08 17:53:30 PDT 2025

Total time taken to generate the page: 0.00504 seconds