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

Home » Public Forums » archive » Re: Help! G4 problem 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
Re: Help! G4 problem reading ascii data [message #36602 is a reply to message #36601] Mon, 06 October 2003 08:50 Go to previous messageGo to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
This looks like a problem with READ_ASCII (or how it is used). If I
read the file myself (code below), everything looks OK.

This does not appear to be related to the "G4 problem".

Ken

250 -0.996365 0.073411 2.003076 0.073721
251 -0.997232 0.061170 2.002258 0.061477
252 -0.997951 0.048919 2.001589 0.049224
253 -0.998521 0.036661 2.001069 0.036963
254 -0.998941 0.024396 2.000701 0.024697
255 -0.999212 0.012128 2.000482 0.012427
256 -0.999334 -0.000143 2.000414 0.000155
257 -0.999306 -0.012415 2.000496 -0.012116
258 -0.999128 -0.024686 2.000729 -0.024386
259 -0.998800 -0.036953 2.001111 -0.036652

> -0.996365 0.073411 2.003076 0.073721
> -0.997232 0.061170 2.002258 0.061477
> -0.997951 0.048919 2.001589 0.049224
> -0.998521 0.036661 2.001069 0.036963
> -0.998941 0.024396 2.000701 0.024697
> -0.999212 0.012128 2.000482 0.012427
> -0.999334 -0.000143 2.000414 0.000155
> -0.999306 -0.012415 2.000496 -0.012116
> -0.999128 -0.024686 2.000729 -0.024386
> -0.998800 -0.036953 2.001111 -0.036652




PRO TESTDATA

infile = '~/testdata.txt' ;Input file
n = FILE_LINES(infile) ;Number of lines

x = FLTARR(4, n) ;Data array
x0 = FLTARR(4) ;Data buffer

OPENR, iunit, infile, /GET_LUN ;Open file
FOR i = 0, n-1 DO BEGIN
READF, iunit, x0 ;Read one line
x[*,i] = x0 ;Store in x
ENDFOR
FREE_LUN, iunit ;Close file

FOR i = 0, n-1 DO PRINT, i, x[*,i], $ ;Print x
FORMAT = "(I4,4F12.6)"

END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Reading and using GrADS format binary data in IDL
Next Topic: IDL Student Edition 'splash' screen

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

Current Time: Fri Oct 10 12:39:34 PDT 2025

Total time taken to generate the page: 0.56153 seconds