[SciPy-User] Setting time step for moving windows

Pierre GM pgmdevlist at gmail.com
Thu Apr 14 10:23:50 EDT 2011


On Apr 14, 2011, at 4:00 PM, Marcin Wlodarczak wrote:

> On 14.04.2011 15:46, Pierre GM wrote:
>>>> Is there any way of modifying the time step for the moving window
>>>> functions? That would be most useful but I cannot see it documented
>>>> anywhere.
>>> 
>>> I meant the moving window functions from the scikits.timeseries module
>>> of course. Sorry if that wasn't clear.
>> 
>> What do you mean, modifying the time step? Could you give us an example of what you have in mind?
> 
> By the time step I mean by how much the window each shifted each time.

Ah OK, I thnk I'm getting it. 
Well, the moving_funcs move your window by 1, and only 1, sorry.
If you need a larger time step, you can sample the result of the moving_func every `timestep`:
>>> mov_func(yourdata, yourwindowsize)[::yourtimestep]
OK, that's a bit sad because you end up computing a lot of data for nothing, but that's the only workaround I can think of right now.
That would be a nice addition, though, so don't hesitate to open a ticket for that.




More information about the SciPy-User mailing list