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

Home » Public Forums » archive » Matching data in different time resolution
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
Matching data in different time resolution [message #71032] Tue, 25 May 2010 13:48
Balt is currently offline  Balt
Messages: 16
Registered: May 2010
Junior Member
Hi all,

I'm looking for an elegant solution (i.e. one that does not involve
nested FOR loops) for the following problem:

I have two independent data acquisition systems that sample data at
different intervals and different start times. Let's say one samples
in 10 second intervals, the other one in 5 second intervals. I now
would like to apply a correction determined by one of the systems to
the other. This means I need to match up the data points in the
corresponding vectors. Let's assume s1 is system one, s2 is system 2
delivering the correction values. I have two vectors for each system,
one containing the timestamps, the other containing the measured data.

For example:

s1_time = [ 0, 10, 20, 30, 40, 50 ]
s1_data = [ 4, 5, 6, 7, 8, 9 ]

s2_time = [ 35, 40, 45, 50, 55, 60 ]
s2_data = [ 1, 2, 3, 2, 1, 2 ]

This presumably is a rebinning exercise of sorts to first make s2 data
match:

s2_time_rebinned = [ 30, 40, 50 ]
s2_data_rebinned = [ 1, 2.5, 1.5 ]

Then adding the result to the s1 vectors:

res_time = [ 30, 40, 50 ]
res_data = [ 8, 10.5, 10.5 ]

Does anyone have pointers/ideas how to best go about this in IDL?

Cheers

- Balt
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: mean and stdev w/ errors
Next Topic: Landsat HDF

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

Current Time: Wed Oct 08 13:31:12 PDT 2025

Total time taken to generate the page: 0.00516 seconds