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

Home » Public Forums » archive » Problems reading ASCII data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Problems reading ASCII data [message #42078] Thu, 16 December 2004 09:58 Go to previous message
rats is currently offline  rats
Messages: 11
Registered: June 2004
Junior Member
I am trying to read in some large ASCII files. I would like to put
these columns into an array, but I am having a problem with the the 5th
column (e.g. 1/1). IDL changes this to 1.00, when I want it to be a
string "1/1" and the other ones to be formatted as double/integer.

This works well using IDL's read_ascii program, but the headers have a
+/- character that makes it 'not a valid ascii file' according to IDL.

Below is a sample of the data file.


------------------------------------------------------------ --------

X |Y |Z |I |Ret#|D±|Ed|Cla|Ang|Time

------------------------------------------------------------ --------

444997.54, 5384000.40, 278.55, 169, 1/1, 0, 0, 2, 0, 588531.995800

444999.16, 5384001.00, 278.38, 183, 1/1, 0, 0, 2, 0, 588531.995800

444997.81, 5384000.48, 294.75, 000, 1/2, 0, 0, 1, 0, 588531.996000


Is there a quick way to read these data into an array, where it will
ignore the header and each column has its own data format?
[Message index]
 
Read Message
Read Message
Previous Topic: questionable display of an IDLgrPolygon Object with some transparency
Next Topic: griding regularly-spaced data

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

Current Time: Wed Oct 08 16:01:32 PDT 2025

Total time taken to generate the page: 0.75958 seconds