[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: implicit loop.Reading of data
- Subject: Re: implicit loop.Reading of data
- From: "Pavel A. Romashkin" <pavel.romashkin(at)noaa.gov>
- Date: Thu, 25 Jan 2001 09:50:30 -0700
- Newsgroups: comp.lang.idl-pvwave
- Organization: NOAA-CMDL-CIRES
- References: <3A703A35.977E3689@noveltis.fr>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23169
Try reading all data into a vector:
a = fltarr(15)
openr, unit, 'myfile.dat', /get_lun
readf, unit, a
free_lun, unit
result = transpose(reform(a, 3, 5))
the above example uses your data layout (3 arrays of 5 elements each).
RESULT is a 5 x 3 array, optimized for rowwise operation (each of your
arrays can ba accessed as Result[*, i].
Cheers,
Pavel
Frédérique Ponchaut wrote:
>
> Good Morning,
>
> I want to read some GPS data. The distribution format has been set up
> for reading in fortran language. Thus, data are stored such as they
> can be read with fortran implicit loops (i.e. read(10,(5(f14.3,2i1)),
> (data1(i),data2(i),data3(i),i=1,5)). I would like to read these data
> with idl.
> For more details, please have a look to the following example:
>
> On one line, 3 arrays of 5 elements each are stored (d1,d2,d3) :
>
> d1(0),d2(0),d3(0),d1(1),d2(1),d3(1),....,d1(4),d2(4),d3(4)
>
> Could you help me to find the way to cope with this problem?
>
> Thanks in advance,
>
> Frederique
>
>
>
> --
> _____________________________
>
> Frédérique Ponchaut
> NOVELTIS
> Parc Technologique du canal
> 2, Avenue de l'Europe
> 31 520 Ramonville St Agne
>
> Tel : +33 (0)5.62.88.11.02
> Fax : +33 (0)5.62.88.11.12
> _____________________________
>
>