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

Home » Public Forums » archive » Reading regular data from a file.
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
Reading regular data from a file. [message #1148] Fri, 16 July 1993 13:22
jabarone is currently offline  jabarone
Messages: 15
Registered: May 1993
Junior Member
Hi,

I am trying to read regular 3-D data of the form -

x y z

from a file. This data is in block format meaning that there are
a certain number of data blocks in the file each with a fixed number
of points. Within these data blocks x remains fixed while y varies
and z = f(x,y). Is there a general IDL procedure or has someone come
up with a procedure that can read this data into arrays suitable
for use with the surface procedure. What I mean is if the file
contains M blocks with N points in each block, is there a way
to read the x, y, and z values intop arrays:

X(M), Y(N), and Z(M,N)

where X(m) corresponds to the first x value in each block,
Y(n) corresponds to the nth y value in each block (n ranging from 0:N-1),
and Z(m,n) is the nth z value in the mth block.

I'd like this procedure to be general meaning it should be able
to handle any block dimensions as long as they are regular through out
the file. I figured that counting the number of points and then counting
the number of elements that stay fixed in a block would do the trick since
they would give me the M and N dimensions I need, but is there a better,
quicker way to do this?

Thanks in advance.

John Barone
jabarone@athena.mit.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NEED LINEAR REGRESSION ROUTINE WHICH TREATS X AND Y EQUALLY
Next Topic: Re: IDL Mailing List

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

Current Time: Sat Oct 11 08:07:50 PDT 2025

Total time taken to generate the page: 1.84275 seconds