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

Home » Public Forums » archive » Re: Reading in a string file
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: Reading in a string file [message #39183 is a reply to message #39182] Tue, 27 April 2004 16:32 Go to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Jonathan Greenberg wrote:
> Any hints on how to read a file which is in CSV form where each entry is a
> text string:

[snip]

> For numerical data I usually do a array = READ_ASCII(filename,delimiter=",")
> And then array=array.(0) so I can have it in a normal array format. For
> this data, however, I get an array of NaN

How about creating a template and then using the template along with
READ_ASCII?

IDL> template = ASCII_Template()
IDL> Read_ASCII(filename, TEMPLATE=template)

If you need to reuse the template, just Save it off somewhere and
Restore it in your program. I have a directory full of IDL Save files
each of which is a single template for the specific file types I work with.

-Mike
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Keyboard Events on Windows
Next Topic: Read 3D array into IDL

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

Current Time: Sun Oct 12 03:32:35 PDT 2025

Total time taken to generate the page: 0.08525 seconds