Re: Reading ASCII Data Files in IDL [message #67880] |
Tue, 08 September 2009 22:23 |
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  |
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.
|
|
|