While I am sure there is an answer, and this question is very low-level (but it's always the easy things that trip you up), my main issue is trying to word the question.
Say I have the following arrays:
time=[0,1,2,3,4,5,6,7,8,9,10,11] ;in seconds
data=[0,1,2,3,4,5,6,7,8,9,10,11]
The 'time' array is in bins of '1s', but instead I would like the array to be in bins of '2s' where the data is then the mean:
time=[0,2,4,6,8,10] ;in seconds
data=[0.5,2.5,4.5,6.5,8.5,10.5]
Is there (and I am sure there is) an IDL function to implement this in IDL? my actual data array is:
DATA DOUBLE = Array[15286473]
so I would rather use an existing, efficient, solution than unnecessarily creating my own.
Cheers, Paul
NB: I can change the time array to what I want by interpolating the data (INTERPOL)
IDL> x=[0,1,2,3,4,5,6,7,8,9,10]
IDL> x_new=interpol(x,(n_elements(x)/2)+1.)
IDL> print, x_new
0.00000 2.00000 4.00000 6.00000 8.00000 10.0000
The issue is just with the data array