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

Home » Public Forums » archive » Re: easy read of column ASCII file in IDL?
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: easy read of column ASCII file in IDL? [message #12709] Fri, 28 August 1998 00:00
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Liam Gumley wrote:

> Peter Clinch wrote:
>> I'm just evaluating IDL as the UK agents are offering a very good
>> "Abandon PV~Wave in favour of IDL" offer.
>> In Wave, we often use DC_READ_FREE with the /col keyword to read column
>> form,atted ASCII data: is there a similarly easy way to do this in IDL?
>
> We swear by DDREAD, a utility developed by Fred Knight. Check out
>
> ftp://ftp.rsinc.com/pub/user_contrib/knight/
>
> From the in-line documentation:
> ; This routine reads data in formatted (or unformatted) rows and
> columns.
> ; The name stands for Data Dump Read. By default, comments are
> ; skipped and the number of columns is sensed. Many options
> ; exist, e.g., selecting rows and columns, reading binary data,
> ; and selecting non-default data type and delimiters.
>
> Cheers,
> Liam.

I agree with Liam - DDREAD makes reading ASCII column data trivial. However,
DDREAD does use another user contribution routine called N_LINES.PRO (or
NLINES.PRO..can't remeber which) in where the total number of lines is
initially set to zero:

n_lines = 0

which can cause consternation if you're reading a large ASCII file. The
definition should be

n_lines = 0L

Just so you know.

paulv

--
Paul van Delst
Space Science and Engineering Center "Religious and cultural
University of Wisconsin-Madison purity is a fundamentalist
1225 W. Dayton St., Madison WI 53706 fantasy"
Ph/Fax: (608) 265-5357, 262-5974 V.S. Naipaul
Email: paul.vandelst@ssec.wisc.edu
Web: http://airs2.ssec.wisc.edu/~paulv
Re: easy read of column ASCII file in IDL? [message #12711 is a reply to message #12709] Fri, 28 August 1998 00:00 Go to previous message
Liam Gumley is currently offline  Liam Gumley
Messages: 473
Registered: November 1994
Senior Member
Peter Clinch wrote:
> I'm just evaluating IDL as the UK agents are offering a very good
> "Abandon PV~Wave in favour of IDL" offer.
> In Wave, we often use DC_READ_FREE with the /col keyword to read column
> form,atted ASCII data: is there a similarly easy way to do this in IDL?

We swear by DDREAD, a utility developed by Fred Knight. Check out

ftp://ftp.rsinc.com/pub/user_contrib/knight/

From the in-line documentation:
; This routine reads data in formatted (or unformatted) rows and
columns.
; The name stands for Data Dump Read. By default, comments are
; skipped and the number of columns is sensed. Many options
; exist, e.g., selecting rows and columns, reading binary data,
; and selecting non-default data type and delimiters.

Cheers,
Liam.
Re: easy read of column ASCII file in IDL? [message #12712 is a reply to message #12709] Fri, 28 August 1998 00:00 Go to previous message
R. Bauer is currently offline  R. Bauer
Messages: 137
Registered: November 1996
Senior Member
Peter Clinch wrote:

> Hi,
>
> I'm just evaluating IDL as the UK agents are offering a very good
> "Abandon PV~Wave in favour of IDL" offer.
>
> In Wave, we often use DC_READ_FREE with the /col keyword to read column
> form,atted ASCII data: is there a similarly easy way to do this in IDL?
>
> Ta, Pete.
> --
>

Please look at the answer how to find number of lines in an ascii file



--
R.Bauer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to display data
Next Topic: easy read of column ASCII file in IDL?

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

Current Time: Wed Oct 08 11:41:14 PDT 2025

Total time taken to generate the page: 0.00628 seconds