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

Home » Public Forums » archive » Re: Speeding up multiple file reading
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: Speeding up multiple file reading [message #47251 is a reply to message #47249] Thu, 02 February 2006 08:42 Go to previous messageGo to previous message
clivecook59 is currently offline  clivecook59
Messages: 26
Registered: November 2005
Junior Member
The code for reading the binary files was not written by me and reads a
proprietary data format. I don't think that there is much i can do
with that code. However i do perform some operations on the data within
the loop and have been trying to relocate them outside of the loop. An
example of this is,

interp_height = 0 + INDGEN(int)*(16 - 0)/FLOAT(int - 1)

for i =0,count1 -1 do begin

data = read_binary_function(binary_file(i))

ch1x = data.ch1x ;1-D
ch2x = data.ch1x ;1-D
ch3x = data.ch1x ;1-D

correction = ......

sigheight(i,*) = height * correction

ch1(i,*) = interpol(ch1x,sig_height(i,*),interp_height)
ch2(i,*) = interpol(ch2x,sig_height(i,*),interp_height)
ch3(i,*) = interpol(ch3x,sig_height(i,*),interp_height)

endfor

So (not sure if this is explained very well) i am using the interpol
function to grid the data to a regaular grid governed by the
interp_height. I have tried to remove these interpol steps from the
loop but with no luck,

ch1 = interpol(ch1x,sig_height,interp_height)

In this case ch1x,sig_height and interp_height have the same dimensions
but does not produce the same results as in the loop. I use rebin to
produce a new 2-D array with the same dimension for interp_height as
ch1x and sig_height, (transpose(rebin(interp_height,400,100))).

I hope this is clear.

thanks

Clive
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Array slices
Next Topic: alternative to execute

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

Current Time: Fri Oct 10 08:35:37 PDT 2025

Total time taken to generate the page: 1.83698 seconds