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

Home » Public Forums » archive » Re: Reading ASCII Data Files 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: Reading ASCII Data Files in IDL [message #67880] Tue, 08 September 2009 22:23
maurya is currently offline  maurya
Messages: 16
Registered: February 2009
Junior Member
On 9 Sep, 08:34, Jeremy Bailin <astroco...@gmail.com> wrote:
> On Sep 8, 9:39 pm, "b.a" <u4565...@anu.edu.au> wrote:
>
>> Hi,
>
>> In my IDL program, I read some data from an ASCII file. I want to skip
>> the first few lines of strings and start from the numerical data
>> underneath the header. the number of lines in the header differs each
>> time so I can't use "header = STRARR()".
>
>> Does anyone have any solution? By the way, I have seen 'http://www.dfanning.com/tips/ascii_column_data.html'but the headers
>> of my files have different lines.
>
>> Thank you.
>
> Maybe readcol in the astronomy user's library would be useful?
>
> -Jeremy.

Hi,

Using ddread.pro (
http://www.astro.washington.edu/docs/idl/cgi-bin/getpro/libr ary42.html?DDREAD),
you can read formatted (or unformatted) rows and columns of a data
file. This will skip the text lines and read the numerical lines.
There are other many options also.

Cheers

RAM
Re: Reading ASCII Data Files in IDL [message #67881 is a reply to message #67880] Tue, 08 September 2009 20:34 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Sep 8, 9:39 pm, "b.a" <u4565...@anu.edu.au> wrote:
> Hi,
>
> In my IDL program, I read some data from an ASCII file. I want to skip
> the first few lines of strings and start from the numerical data
> underneath the header. the number of lines in the header differs each
> time so I can't use "header = STRARR()".
>
> Does anyone have any solution? By the way, I have seen 'http://www.dfanning.com/tips/ascii_column_data.html' but the headers
> of my files have different lines.
>
> Thank you.

Maybe readcol in the astronomy user's library would be useful?

-Jeremy.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Reading ASCII Data Files in IDL
Next Topic: Re: checking the data type in IDL

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

Current Time: Sat Oct 11 10:05:35 PDT 2025

Total time taken to generate the page: 0.96246 seconds